[10919] Actually use spell penetration gained by items in calculations

This commit is contained in:
zergtmn 2010-12-24 21:18:23 +05:00
parent a13f8714f2
commit 14c1329ea5
4 changed files with 8 additions and 1 deletions

View file

@ -1905,6 +1905,9 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
// Ignore resistance by self SPELL_AURA_MOD_TARGET_RESISTANCE aura
tmpvalue2 += (float)pCaster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask);
if (pCaster->GetTypeId() == TYPEID_PLAYER)
tmpvalue2 -= (float)((Player*)pCaster)->GetSpellPenetrationItemMod();
tmpvalue2 *= (float)(0.15f / getLevel());
if (tmpvalue2 < 0.0f)
tmpvalue2 = 0.0f;