Skip to content

Commit

Permalink
feat(Core/Spells): Implement SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyeriah authored Dec 25, 2023
1 parent e58fb75 commit be4d904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/game/Entities/Creature/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Spells/SpellInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit be4d904

Please sign in to comment.