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

Ref #7254
This commit is contained in:
joschiwald
2013-08-17 00:47:44 +02:00
parent 918427dcb1
commit c45e665c86
5 changed files with 163 additions and 131 deletions
@@ -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)