Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect reservation on some legacy builds #3909

Merged

Conversation

Lothrik
Copy link
Contributor

@Lothrik Lothrik commented Jan 18, 2022

Fixes #3211.

I checked a few of my own builds and didn't notice any inconsistencies with mana or life reservation values before and after this change, I'd appreciate additional testing on that front though.

Description of the problem being solved:

Legacy builds with 100% reduced mana reservation end up reserving very small (but non-zero) values. I fixed this by just completely rewriting the reservedFlat and reservedPercent formulas to match current behaviour in PoE and fix this edge case. As a bonus the formula is also significantly less confusing to look at.

Link to a build that showcases this PR:

https://pastebin.com/qVpv8y1b

Before screenshot:

After screenshot:

@Lothrik Lothrik added the bug Something isn't working label Jan 18, 2022
Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with some other builds of my own and builds from #3604 and didn't find any issues

@Wires77 Wires77 changed the title Fix incorrect reservation legacy build edge case Fix incorrect reservation on some legacy builds Jan 21, 2022
@Wires77 Wires77 merged commit 0dba2c6 into PathOfBuildingCommunity:dev Jan 21, 2022
@Lothrik Lothrik deleted the fix-legacy-100-rmr-edge-case branch January 21, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants