checking spell attribute SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY not present before calling pVictim->IsImmuneToDamage in Unit::SpellHitResult

This commit is contained in:
Gemt
2017-08-19 00:11:38 +02:00
parent 9c4c09a03b
commit f3a10aedac
+5 -2
View File
@@ -3047,8 +3047,11 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, Spell
else
schoolMask = GetSpellSchoolMask(spell);
if (pVictim != this && pVictim->IsImmuneToDamage(schoolMask))
return SPELL_MISS_IMMUNE;
if (!spell->HasAttribute(SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
{
if (pVictim != this && pVictim->IsImmuneToDamage(schoolMask))
return SPELL_MISS_IMMUNE;
}
// Try victim reflect spell
if (CanReflect)