fix(Core/Scripts): Fix Ebon Gargoyle infinite evade loop (#25173)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
749a31c3fa
commit
a4136cc8b9
1 changed files with 19 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue