fix(Scripts/ZulGurub): reset Thekal encounter after a wipe (#26686)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-07-19 09:28:18 -03:00
committed by GitHub
parent 60dd3da660
commit ad66a0b768

View File

@@ -204,14 +204,14 @@ struct boss_thekal : public BossAI
void UpdateAI(uint32 diff) override
{
if (me->IsInCombat() && !UpdateVictim())
// Gate on IsEngaged, not IsInCombat: on a wipe the boss leaves combat while still engaged,
// and UpdateVictim must keep running to evade and clear the IN_PROGRESS state.
if (me->IsEngaged())
{
return;
}
else if (me->IsInCombat())
{
scheduler.Update(diff,
std::bind(&BossAI::DoMeleeAttackIfReady, this));
if (!UpdateVictim())
return;
scheduler.Update(diff, [this] { DoMeleeAttackIfReady(); });
}
else
{
@@ -396,14 +396,12 @@ struct npc_zealot_lorkhan : public ScriptedAI
void UpdateAI(uint32 diff) override
{
if (me->IsInCombat() && !UpdateVictim())
if (me->IsEngaged())
{
return;
}
else if (me->IsInCombat())
{
_scheduler.Update(diff,
std::bind(&BossAI::DoMeleeAttackIfReady, this));
if (!UpdateVictim())
return;
_scheduler.Update(diff, [this] { DoMeleeAttackIfReady(); });
}
else
{
@@ -497,14 +495,12 @@ struct npc_zealot_zath : public ScriptedAI
void UpdateAI(uint32 diff) override
{
if (me->IsInCombat() && !UpdateVictim())
if (me->IsEngaged())
{
return;
}
else if (me->IsInCombat())
{
_scheduler.Update(diff,
std::bind(&BossAI::DoMeleeAttackIfReady, this));
if (!UpdateVictim())
return;
_scheduler.Update(diff, [this] { DoMeleeAttackIfReady(); });
}
else
{