fix(Core/Totem): Totems shouldn't be immune to intervene. (#19372)

* fix(Core/Totem): Totems shouldn't be immune to intervene

* cs is my enemy
This commit is contained in:
avarishd
2024-07-09 20:39:05 +03:00
committed by GitHub
parent 1dcfc7d3ee
commit 7d08758f1f
2 changed files with 12 additions and 3 deletions

View File

@@ -173,12 +173,13 @@ void Totem::UnSummon(uint32 msTime)
bool Totem::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const
{
// xinef: immune to all positive spells, except of stoneclaw totem absorb and sentry totem bind sight
// xinef: immune to all positive spells, except of stoneclaw totem absorb, sentry totem bind sight and intervene
// totems positive spells have unit_caster target
if (spellInfo->Effects[index].Effect != SPELL_EFFECT_DUMMY &&
spellInfo->Effects[index].Effect != SPELL_EFFECT_SCRIPT_EFFECT &&
spellInfo->IsPositive() && spellInfo->Effects[index].TargetA.GetTarget() != TARGET_UNIT_CASTER &&
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY && spellInfo->Id != 55277 && spellInfo->Id != 6277)
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY &&
spellInfo->Id != SPELL_STONECLAW && spellInfo->Id != SPELL_BIND_SIGHT && spellInfo->Id != SPELL_INTERVENE)
return true;
// Cyclone shouldn't be casted on totems

View File

@@ -37,7 +37,15 @@ enum class TotemSpellIds : uint32
#define SENTRY_TOTEM_ENTRY 3968
#define EARTHBIND_TOTEM_ENTRY 2630
constexpr uint32 SPELL_CYCLONE = 33786;
enum TotemImmunitySpells
{
// Immune
SPELL_CYCLONE = 33786,
// Not Immune
SPELL_STONECLAW = 55277,
SPELL_BIND_SIGHT = 6277,
SPELL_INTERVENE = 3411
};
class Totem : public Minion
{