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)))

View File

@@ -204,6 +204,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_FORCE_SEND_CATEGORY_COOLDOWNS = 0x10000000,
SPELL_ATTR0_CU_FORCE_AURA_SAVING = 0x20000800,
SPELL_ATTR0_CU_ENCOUNTER_REWARD = 0x40000000, // pussywizard
SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY = 0x80000000,
SPELL_ATTR0_CU_NEGATIVE = SPELL_ATTR0_CU_NEGATIVE_EFF0 | SPELL_ATTR0_CU_NEGATIVE_EFF1 | SPELL_ATTR0_CU_NEGATIVE_EFF2,
SPELL_ATTR0_CU_POSITIVE = SPELL_ATTR0_CU_POSITIVE_EFF0 | SPELL_ATTR0_CU_POSITIVE_EFF1 | SPELL_ATTR0_CU_POSITIVE_EFF2,