Core/Units: Fixed crash added in 7f960fed73
This commit is contained in:
@@ -11722,10 +11722,11 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
|||||||
float TakenTotalCasterMod = 0.0f;
|
float TakenTotalCasterMod = 0.0f;
|
||||||
|
|
||||||
// get all auras from caster that allow the spell to ignore resistance (sanctified wrath)
|
// 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);
|
AuraEffectList const& IgnoreResistAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
|
||||||
for (AuraEffectList::const_iterator i = IgnoreResistAuras.begin(); i != IgnoreResistAuras.end(); ++i)
|
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);
|
TakenTotalCasterMod += (float((*i)->GetAmount())/100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user