aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHouston <69751143+HoustonCore@users.noreply.github.com>2020-09-02 17:41:34 +0300
committerShauren <shauren.trinity@gmail.com>2022-02-04 23:41:43 +0100
commit1f774873bfd97039ce63933a538a907a0ed67c2c (patch)
treef1cb108bd9f0c911650042c46289ccf78187e510 /src
parentc4b287c7bfb2bb2dcb5efacf238e29413ebe77ec (diff)
Core/Totem: Immune to all positive spells. (#25326)
* Core/Totem: Immune to all positive spells. * Fix tabs * Avoid using magic numbers * Remove whitespace Co-authored-by: Moki <moki.play@mail.ru> (cherry picked from commit 8d0f52247fe6dbc51a6a41d0530f4409c5f9fbb3)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Totem/Totem.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index caf8c50274e..43be89d22c2 100644
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -141,9 +141,13 @@ void Totem::UnSummon(uint32 msTime)
bool Totem::IsImmunedToSpellEffect(SpellInfo const* spellInfo, SpellEffectInfo const& spellEffectInfo, 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 (spellEffectInfo.Effect != SPELL_EFFECT_DUMMY &&
+ spellEffectInfo.Effect != SPELL_EFFECT_SCRIPT_EFFECT &&
+ spellInfo->IsPositive() && spellEffectInfo.TargetA.GetTarget() != TARGET_UNIT_CASTER &&
+ spellEffectInfo.TargetA.GetCheckType() != TARGET_CHECK_ENTRY)
+ return true;
switch (spellEffectInfo.ApplyAuraName)
{