diff options
author | thenecromancer <none@none> | 2010-01-23 15:44:28 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-23 15:44:28 +0100 |
commit | 84980ea77ca0a73f591db5e8db007dd4770479d1 (patch) | |
tree | 3e271ad60959343c4a87763c1deb8843db5f3f56 /src | |
parent | 39ba392c7538db1bd18e617185c28420780e237c (diff) |
Apply armor reduction for physical attacks before other calculations ( for correct block amount and etc..)
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1204c508695..65038562091 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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); |