aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2024-06-22 14:03:17 +0200
committerGitHub <noreply@github.com>2024-06-22 14:03:17 +0200
commit8824889f53a9d11d5b943f844900e41456edddec (patch)
tree326738130fc80b4ef310eb8a564bc3fda51b6b66 /src
parentb1c15cbfe61884664ed7615a34ca77ad0db3d95c (diff)
Core/Spells: Don't return immune to reflected spells due to target aurastate (#30050)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 24e70e7aff7..a78f031c310 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2198,7 +2198,8 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
Unit* unitCaster = ASSERT_NOTNULL(m_caster->ToUnit());
// Calculate reflected spell result on caster
- if (m_spellInfo->CheckTarget(target, unitCaster, implicit) == SPELL_CAST_OK)
+ SpellCastResult castResult = m_spellInfo->CheckTarget(target, unitCaster, implicit);
+ if (castResult == SPELL_CAST_OK || castResult == SPELL_FAILED_TARGET_AURASTATE)
targetInfo.ReflectResult = unitCaster->SpellHitResult(unitCaster, m_spellInfo, false); // can't reflect twice
else
targetInfo.ReflectResult = SPELL_MISS_IMMUNE;