Apply armor reduction for physical attacks before other calculations ( for correct block amount and etc..)
--HG-- branch : trunk
This commit is contained in:
+4
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user