ThePhrozenKeep / D2MOO

Reimplementation of the Diablo2 game coupled with patching facilities for modders.
MIT License
93 stars 29 forks source link

Fixed SKILLS_CalculateMasteryBonus (order of operations) #145

Closed nooperation closed 9 months ago

nooperation commented 9 months ago

Fixed SKILLS_CalculateMasteryBonus so it matches the original code's multiplication and division ordering. It uses the "MONSTERUNIQUE_CalculatePercentage" logic inlined, but a dependency on Game from Common would look a bit weird so I just left it as is for now

nooperation commented 9 months ago

Please use DATATBLS_ApplyRatio and int32_t instead of auto for the type of nPercentage

Nice, I didn't see DATATBLS_ApplyRatio before. This will save some headache in not having to refactor that common logic