ThePhrozenKeep / D2MOO

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

fix SUNITDMG_ApplyResistancesAndAbsorb when dealing with negative damage values #148

Closed nooperation closed 9 months ago

nooperation commented 9 months ago

In the original codebase SUNITDMG_ApplyResistancesAndAbsorb sets the damage value to 0 and returns early if pValue is <= 0;

This matters for weird cases where you have 0 damage and some additional absorbs/etc, pushing pValue negative when the original logic would not have done that