diff options
author | P-Kito <kito@vortexirc.com> | 2015-07-09 09:08:57 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-04-02 15:30:09 +0200 |
commit | cd435b1385b0b36ad1f1837d03dd6e3c58443144 (patch) | |
tree | a518d74e169e0af70c3cc2fd8d183e5044342ab8 /src | |
parent | 50ad1cca003f6f13b2b62729bc806e8d07a4b74b (diff) |
Unit/CalcAbsorbResist: Sanctified Wrath should pierce absorb effects
by P-Kito; retrieved from #15027
The paladin talent Sanctified Wrath should pierce absorb effects.
(cherry picked from commit b8762d8a9fdfad77f3c16c367cdd5cc69ff70fd1)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6e6f8788201..0f6c18c6273 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1639,6 +1639,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)); @@ -1671,9 +1674,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())); @@ -1722,8 +1722,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())); @@ -1752,6 +1750,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe } } + dmgInfo.ModifyDamage(absorbIgnoringDamage); + // split damage auras - only when not damaging self if (victim != this) { |