mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/Movement): restore JustExitedCombat evade to fix waypoint resume (#25332)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -309,8 +309,12 @@ void CreatureAI::EngagementOver()
|
|||||||
|
|
||||||
void CreatureAI::JustExitedCombat()
|
void CreatureAI::JustExitedCombat()
|
||||||
{
|
{
|
||||||
// Creatures evade through UpdateVictim() detecting out-of-combat state.
|
EngagementOver();
|
||||||
// Scripts that need custom combat-exit behavior should override this.
|
|
||||||
|
// If creature is alive, in world, and not already evading, trigger evade to return home
|
||||||
|
// Check IsInWorld to avoid evade during server shutdown/cleanup
|
||||||
|
if (me->IsAlive() && me->IsInWorld() && !me->IsInEvadeMode())
|
||||||
|
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void CreatureAI::AttackedBy(Unit* attacker)
|
/*void CreatureAI::AttackedBy(Unit* attacker)
|
||||||
|
|||||||
Reference in New Issue
Block a user