From 3fee40be7dac90ca99f73e6ae809b18ed7135ef6 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 26 Jan 2023 08:38:16 +0100 Subject: [PATCH] =?UTF-8?q?fix(Core/Creatures):=20Spells=20casted=20by=20p?= =?UTF-8?q?layer=20should=20tap=20the=20creature=20=E2=80=A6=20(#14725)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …only if in combat with it. --- src/server/game/Spells/Spell.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 411da01b6..54a700170 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2918,11 +2918,14 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS)); // Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped. - if (Creature* creature = effectUnit->ToCreature()) + if (effectUnit->IsInCombatWith(m_caster)) { - if (!creature->hasLootRecipient() && m_caster->IsPlayer()) + if (Creature* creature = effectUnit->ToCreature()) { - creature->SetLootRecipient(m_caster); + if (!creature->hasLootRecipient() && m_caster->IsPlayer()) + { + creature->SetLootRecipient(m_caster); + } } }