Skip to content

Commit

Permalink
Spell: SPELL_ATTR_EX3_IGNORE_CASTER_MODIFIERS should not affect armor…
Browse files Browse the repository at this point in the history
… application
  • Loading branch information
killerwife committed Sep 16, 2023
1 parent 139ceb0 commit 98a80e3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,15 +1272,14 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
spellDamageInfo.HitInfo |= SPELL_HIT_TYPE_CRIT;
spellDamageInfo.damage = affectiveCaster->CalculateCritAmount(unitTarget, spellDamageInfo.damage, m_spellInfo);
}

// damage mitigation
if (spellDamageInfo.damage > 0)
{
// physical damage => armor
if (m_spellSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
spellDamageInfo.damage = Unit::CalcArmorReducedDamage(affectiveCaster ? affectiveCaster : m_trueCaster, unitTarget, spellDamageInfo.damage);
}
}
}
// damage mitigation
if (spellDamageInfo.damage > 0)
{
// physical damage => armor
if (m_spellSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
spellDamageInfo.damage = Unit::CalcArmorReducedDamage(affectiveCaster ? affectiveCaster : m_trueCaster, unitTarget, spellDamageInfo.damage);
}

unitTarget->CalculateAbsorbResistBlock(affectiveCaster, &spellDamageInfo, m_spellInfo);

Expand Down

0 comments on commit 98a80e3

Please sign in to comment.