fix(Core/Scripts): Fix Ebon Gargoyle infinite evade loop (#25173)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc 2026-03-21 21:35:24 -05:00 committed by GitHub
parent 749a31c3fa
commit a4136cc8b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();