From 7d08758f1f3365cb2baee36b33d04bd36b031661 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:39:05 +0300 Subject: [PATCH] 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 --- src/server/game/Entities/Totem/Totem.cpp | 5 +++-- src/server/game/Entities/Totem/Totem.h | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index ac495b02e..739ff3935 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -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 diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index fcaabf91d..5265435d5 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -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 {