diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-07-03 11:45:19 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-07-03 11:45:19 +0200 |
commit | 96014a70cba0d333d7e76cc90cf36468a8b3b247 (patch) | |
tree | 09b4b5dadbdefc18bbfabaa733e59aad9b5de03a /src | |
parent | d28f348caf3b879d8f8dcc7d7ea01e5e893ffada (diff) |
Core/Units: Fixed crash added in 7f960fed732f119b6776bc51a4465e8e7a1a10dd
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e17de57f797..92f2f30b0ff 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11722,10 +11722,11 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT float TakenTotalCasterMod = 0.0f; // get all auras from caster that allow the spell to ignore resistance (sanctified wrath) + SpellSchoolMask attackSchoolMask = spellProto ? spellProto->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL; AuraEffectList const& IgnoreResistAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST); for (AuraEffectList::const_iterator i = IgnoreResistAuras.begin(); i != IgnoreResistAuras.end(); ++i) { - if ((*i)->GetMiscValue() & spellProto->GetSchoolMask()) + if ((*i)->GetMiscValue() & attackSchoolMask) TakenTotalCasterMod += (float((*i)->GetAmount())/100); } |