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:
Andrew 2026-03-31 20:22:39 -03:00 committed by GitHub
parent 373e1d75c0
commit eb09ad5d60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -309,8 +309,12 @@ void CreatureAI::EngagementOver()
void CreatureAI::JustExitedCombat()
{
// Creatures evade through UpdateVictim() detecting out-of-combat state.
// Scripts that need custom combat-exit behavior should override this.
EngagementOver();
// 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)