Core/Units: Fixed crash added in 7f960fed73

This commit is contained in:
Shauren
2012-07-03 11:45:19 +02:00
parent d28f348caf
commit 96014a70cb
+2 -1
View File
@@ -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);
}