Entities/Unit: Add a missing underflow check to prevent really really low damage from underflowing when paired with flat damage modifiers. Closes #23655.

(cherry picked from commit a8b1b9a3c6)
This commit is contained in:
Treeston
2019-08-01 01:26:19 +02:00
committed by Shauren
parent dad86f5bce
commit 970a89a8c3

View File

@@ -7325,6 +7325,9 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
else
TakenFlatBenefit += GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN);
if ((TakenFlatBenefit < 0) && (pdamage < static_cast<uint32>(-TakenFlatBenefit)))
return 0;
// Taken total percent damage auras
float TakenTotalMod = 1.0f;