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
2016-04-11 20:48:24 +02:00
committed by Aokromes
parent a3e17a8d4d
commit 4801f77b3c

View File

@@ -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;