Core/Spells: move spell resistance calculation into separate function (and some cosmetic changes)

Ref #7254
This commit is contained in:
joschiwald committed 2013-08-17 00:47:44 +02:00
1 parent 918427dcb1
commit c45e665c86
5 files changed
+163 -131

No files matched your search

@@ -184,6 +184,12 @@ bool Player::UpdateAllStats()
return true;
}
void Player::ApplySpellPenetrationBonus(int32 amount, bool apply)
{
ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, -amount, apply);
m_spellPenetrationItemMod += apply ? amount : -amount;
}
void Player::UpdateResistances(uint32 school)
{
if (school > SPELL_SCHOOL_NORMAL)