diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-04-11 20:48:24 +0200 |
---|---|---|
committer | DDuarte <dnpd.dd@gmail.com> | 2016-04-16 01:31:59 +0100 |
commit | 9a799d756375ded22cdda2fe56248922394ab9a0 (patch) | |
tree | 9124b28c3bf48b3d7a9257ec89e090f0115c9bcf /src | |
parent | 38cc1b902d4941d14144722e2b5e0b191a808365 (diff) |
Core/Auras: Fixed a visual issue with combat log appearing to deal negative damage with SPELL_AURA_PERIODIC_LEECH if the spell does more damage than target has health (before calculating resist) and any damage is resisted.
Closes #16495
(cherry picked from commit f9697cb86abfda55393bb0a5d842b2dbf32b990a)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ea6b607e7a3..05bcaebf3bd 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -6138,9 +6138,6 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, m_spellInfo); - if (target->GetHealth() < damage) - damage = uint32(target->GetHealth()); - TC_LOG_DEBUG("spells.periodic", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u", GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb); @@ -6152,6 +6149,9 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c if (crit) log.HitInfo |= SPELL_HIT_TYPE_CRIT; + if (target->GetHealth() < damage) + damage = uint32(target->GetHealth()); + // Set trigger flag uint32 procAttacker = PROC_FLAG_DONE_PERIODIC; uint32 procVictim = PROC_FLAG_TAKEN_PERIODIC; |