mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user