[Core] Make use of attribute SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY. [cz2660]
This will allow all spells that have this attribute to be casted on targets that are immune to certain types of damage or spells. This involves mostly spells that are part of a script or event.
This commit is contained in:
parent
f74a6bdb60
commit
297e28044e
@ -2644,7 +2644,7 @@ SpellMissInfo Unit::SpellHitResult(Unit* pVictim, SpellEntry const* spell, bool
|
||||
{ return SPELL_MISS_EVADE; }
|
||||
|
||||
// Check for immune
|
||||
if (pVictim->IsImmuneToSpell(spell, this == pVictim))
|
||||
if (pVictim->IsImmuneToSpell(spell, this == pVictim) && !spell->HasAttribute(SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
|
||||
{ return SPELL_MISS_IMMUNE; }
|
||||
|
||||
// All positive spells can`t miss
|
||||
@ -2653,7 +2653,7 @@ SpellMissInfo Unit::SpellHitResult(Unit* pVictim, SpellEntry const* spell, bool
|
||||
{ return SPELL_MISS_NONE; }
|
||||
|
||||
// Check for immune (use charges)
|
||||
if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell)))
|
||||
if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell)) && !spell->HasAttribute(SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
|
||||
{ return SPELL_MISS_IMMUNE; }
|
||||
|
||||
// Try victim reflect spell
|
||||
|
Loading…
x
Reference in New Issue
Block a user