feat(Core/Spells): Implement SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY (#18056)

This commit is contained in:
Andrew
2023-12-25 03:58:29 -03:00
committed by GitHub
parent e58fb75848
commit be4d90404b
2 changed files with 6 additions and 0 deletions

View File

@@ -2192,6 +2192,11 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo, Spell const* spell)
if (!spellInfo)
return false;
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY))
{
return false;
}
// Xinef: this should exclude self casts...
// Spells that don't have effectMechanics.
if (spellInfo->Mechanic > MECHANIC_NONE && HasMechanicTemplateImmunity(1 << (spellInfo->Mechanic - 1)))