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