Items with percentage bonus attributes should recalculate the bonus value on level change
#3575 aperta il 17 ago 2021
Metriche repository
- Star
- (1813 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Before creating an issue, please ensure:
- This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
- This issue is reproducible without changes to the C++ code in this repository
Steps to reproduce (include any configuration/script required to reproduce)
- Ensure that your hitpoints are set to your max hitpoints.
- Equip an item that utilizes an attribute such as
maxhitpointspercent. - Level up your character.
- (Optional: Take note of your hitpoints and relog, the value will change).
Expected behaviour
A character with 1000 health, on equipping an item with maxhitpointspercent attribute and a value of 105 (+5% bonus hitpoints) will have 1050 health (the value 50 will be put into varStats for this slot item). Once your character levels up (ex. a Knight gains 25 hitpoints per level) now you have 1025 hitpoints by default. The value inside varStats should be updated from 50 to 76 (rounded down from 76.25) for a total hitpoints value of 1076.
Actual behaviour
The value inside of varStats when leveling up in the above example is still 50 because the +5% bonus hitpoints from the equipped item does not get recalculated on level up.
Final thoughts
- This is likely an extension of #2716.
- This should account for when characters lose levels as well.
- This should happen with the
maxmanapointspercentattribute as well, or really, any attributes that use percentages.