From b5e177edbcb8e4883e5bba024ea5f80c3ded7133 Mon Sep 17 00:00:00 2001 From: Wyrserth Date: Sat, 3 Sep 2022 12:03:07 +0200 Subject: [PATCH] Core/Spell: fix some issues with taunt spells --- src/server/game/Spells/Spell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 43be827ad3..63dd9a9d0f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2439,6 +2439,10 @@ void Spell::TargetInfo::PreprocessTarget(Spell* spell) else if (MissCondition == SPELL_MISS_REFLECT && ReflectResult == SPELL_MISS_NONE) _spellHitTarget = spell->m_caster->ToUnit(); + // Ensure that a player target is put in combat by a taunt, even if they result immune clientside + if ((MissCondition == SPELL_MISS_IMMUNE || MissCondition == SPELL_MISS_IMMUNE2) && spell->m_caster->GetTypeId() == TYPEID_PLAYER && unit->GetTypeId() == TYPEID_PLAYER && spell->m_caster->IsValidAttackTarget(unit, spell->GetSpellInfo())) + unit->SetInCombatWith(spell->m_caster->ToPlayer()); + _enablePVP = false; // need to check PvP state before spell effects, but act on it afterwards if (_spellHitTarget) {