diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 41131cc58c..4f54182567 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -147,9 +147,13 @@ void Totem::UnSummon(uint32 msTime) bool Totem::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index, WorldObject const* caster) const { - /// @todo possibly all negative auras immune? - if (GetEntry() == 5925) - return false; + // immune to all positive spells, except of stoneclaw totem absorb and sentry totem bind sight + // 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 != SENTRY_STONECLAW_SPELLID && spellInfo->Id != SENTRY_BIND_SIGHT_SPELLID) + return true; switch (spellInfo->Effects[index].ApplyAuraName) { diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index 2748e1b9a1..28fffd928a 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -34,6 +34,10 @@ enum TotemSpells SPELL_TOTEMIC_WRATH = 77747 }; +// Totems spells +#define SENTRY_STONECLAW_SPELLID 55277 +#define SENTRY_BIND_SIGHT_SPELLID 6277 + class TC_GAME_API Totem : public Minion { public: