mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
Unit/CalcAbsorbResist: Sanctified Wrath should pierce absorb effects
by P-Kito; retrieved from #15027 The paladin talent Sanctified Wrath should pierce absorb effects.
This commit is contained in:
@@ -1669,6 +1669,9 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
|
||||
RoundToInterval(auraAbsorbMod, 0.0f, 100.0f);
|
||||
|
||||
uint32 absorbIgnoringDamage = CalculatePct(dmgInfo.GetDamage(), auraAbsorbMod);
|
||||
dmgInfo.ModifyDamage(-absorbIgnoringDamage);
|
||||
|
||||
// We're going to call functions which can modify content of the list during iteration over it's elements
|
||||
// Let's copy the list so we can prevent iterator invalidation
|
||||
AuraEffectList vSchoolAbsorbCopy(victim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_ABSORB));
|
||||
@@ -1701,9 +1704,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
if (defaultPrevented)
|
||||
continue;
|
||||
|
||||
// Apply absorb mod auras
|
||||
AddPct(currentAbsorb, -auraAbsorbMod);
|
||||
|
||||
// absorb must be smaller than the damage itself
|
||||
currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage()));
|
||||
|
||||
@@ -1752,8 +1752,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
if (defaultPrevented)
|
||||
continue;
|
||||
|
||||
AddPct(currentAbsorb, -auraAbsorbMod);
|
||||
|
||||
// absorb must be smaller than the damage itself
|
||||
currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage()));
|
||||
|
||||
@@ -1782,6 +1780,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
}
|
||||
}
|
||||
|
||||
dmgInfo.ModifyDamage(absorbIgnoringDamage);
|
||||
|
||||
// split damage auras - only when not damaging self
|
||||
if (victim != this)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user