From 96014a70cba0d333d7e76cc90cf36468a8b3b247 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 3 Jul 2012 11:45:19 +0200 Subject: Core/Units: Fixed crash added in 7f960fed732f119b6776bc51a4465e8e7a1a10dd --- src/server/game/Entities/Unit/Unit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3