From a4136cc8b9d97aa0d160c4f78193e00f67884503 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Sat, 21 Mar 2026 21:35:24 -0500 Subject: [PATCH] fix(Core/Scripts): Fix Ebon Gargoyle infinite evade loop (#25173) Co-authored-by: blinkysc --- src/server/scripts/Pet/pet_dk.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp index e86aadd7a..f3d561f37 100644 --- a/src/server/scripts/Pet/pet_dk.cpp +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -70,6 +70,25 @@ struct npc_pet_dk_ebon_gargoyle : ScriptedAI } } + void JustExitedCombat() override + { + EngagementOver(); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + if (!_EnterEvadeMode()) + return; + + me->ClearUnitState(UNIT_STATE_EVADE); + + if (Unit* owner = me->GetOwner()) + { + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); + } + } + void InitializeAI() override { ScriptedAI::InitializeAI();