Apply armor reduction for physical attacks before other calculations ( for correct block amount and etc..)

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-23 15:44:28 +01:00
parent 39ba392c75
commit 84980ea77c
+4 -5
View File
@@ -1090,8 +1090,10 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 dama
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
uint32 crTypeMask = pVictim->GetCreatureTypeMask();
// Check spell crit chance
//bool crit = isSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType);
if (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
damage = CalcArmorReducedDamage(pVictim, damage, spellInfo, attackType);
bool blocked = false;
// Per-school calc
switch (spellInfo->DmgClass)
@@ -1168,9 +1170,6 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 dama
break;
}
if (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
damage = CalcArmorReducedDamage(pVictim, damage, spellInfo, attackType);
// only from players
if (GetTypeId() == TYPEID_PLAYER)
damage -= pVictim->GetSpellDamageReduction(damage);