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
This commit is contained in:
Shauren authored and Aokromes committed 2016-05-12 08:33:11 +02:00
1 parent a3e17a8d4d
commit 4801f77b3c
1 file changed
+3 -3
@@ -5965,14 +5965,14 @@ 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);
caster->SendSpellNonMeleeDamageLog(target, GetId(), damage, GetSpellInfo()->GetSchoolMask(), absorb, resist, false, 0, crit);
if (target->GetHealth() < damage)
damage = uint32(target->GetHealth());
// Set trigger flag
uint32 procAttacker = PROC_FLAG_DONE_PERIODIC;
uint32 procVictim = PROC_FLAG_TAKEN_PERIODIC;