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:
parent
9c6a69d8db
commit
ab6315db98
3 changed files with 47 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue