fix(Core/SmartAI): Fix Scarlet Monastery Cathedral encounter reset (#25362)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-04-03 23:52:54 -03:00 committed by GitHub
parent 9c6a69d8db
commit ab6315db98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 0 deletions

View file

@ -697,6 +697,20 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
MovepointReached(Data);
}
void SmartAI::JustExitedCombat()
{
// When evade is suppressed or disabled, don't auto-evade on combat exit.
// This prevents scripted encounters (e.g. Mograine/Whitemane) from resetting
// when bosses temporarily stop fighting during scripted phases.
if (mSuppressEvade || mEvadeDisabled)
{
EngagementOver();
return;
}
CreatureAI::JustExitedCombat();
}
void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
{
if (mSuppressEvade)

View file

@ -85,6 +85,9 @@ public:
// Called for reaction at enter to combat if not in combat yet (enemy can be nullptr)
void JustEngagedWith(Unit* enemy) override;
// Called when creature exits combat (all combat refs gone)
void JustExitedCombat() override;
// Called for reaction at stopping attack at no attackers or targets
void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER) override;