From 0e1e8f27de6e9618235250c39915664b3add1ce7 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Fri, 6 Jan 2023 00:51:54 +0100 Subject: [PATCH] fix(Core/Spells): Every spell casted by player should tap the creature. (#14037) Fixes #11888 --- src/server/game/Spells/Spell.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2053b4e50..411da01b6 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2917,6 +2917,15 @@ 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 (!creature->hasLootRecipient() && m_caster->IsPlayer()) + { + creature->SetLootRecipient(m_caster); + } + } + // Unsure if there are more spells that are not supposed to stop enemy from // regenerating HP from food, so for now it stays as an ID. const uint32 SPELL_PREMEDITATION = 14183;