From 575f42089e2014c3df64f0468ed25c45a544f6d8 Mon Sep 17 00:00:00 2001 From: Wyrserth Date: Thu, 27 Jun 2019 22:08:39 +0200 Subject: Core/Spell: fix some issues with taunt spells (#23425) (cherry picked from commit 5dc2dfd60c4ecd243729e86496d926976e383156) --- src/server/game/Spells/Spell.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 8486580a215..3bc60f66b3c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2372,6 +2372,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) { -- cgit v1.2.3