fix(Scripts/Ulduar): Assembly of Iron no longer revives dead council members on a partial evade (#26262)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-06-18 10:01:38 -03:00
committed by GitHub
parent 3c0f02a21b
commit 0c4bb984ae
@@ -135,6 +135,22 @@ static uint8 CountAliveBosses(InstanceScript* instance)
return count;
}
// True while any council member other than `me` is still alive and engaged.
// IsEngaged() (not IsInCombat()) survives Brundir's ~16s CombatStop during
// Lightning Tendrils, so a lone survivor's reset cannot revive dead members.
static bool IsAnyAssemblyMemberEngaged(InstanceScript* pInstance, Creature* me)
{
if (!pInstance || !me)
return false;
for (uint8 i = 0; i < 3; ++i)
if (Creature* boss = pInstance->GetCreature(DATA_STEELBREAKER + i))
if (boss != me && boss->IsAlive() && boss->IsEngaged())
return true;
return false;
}
bool IsEncounterComplete(InstanceScript* pInstance, Creature* me)
{
if (!pInstance || !me)
@@ -186,12 +202,16 @@ struct boss_steelbreaker : public ScriptedAI
void Reset() override
{
me->SetLootMode(0);
RespawnAssemblyOfIron(pInstance, me);
_phase = 0;
events.Reset();
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
if (!IsAnyAssemblyMemberEngaged(pInstance, me))
{
RespawnAssemblyOfIron(pInstance, me);
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
}
}
void JustReachedHome() override
@@ -376,14 +396,17 @@ struct boss_runemaster_molgeim : public ScriptedAI
void Reset() override
{
me->SetLootMode(0);
RespawnAssemblyOfIron(pInstance, me);
_phase = 0;
events.Reset();
summons.DespawnAll();
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
if (!IsAnyAssemblyMemberEngaged(pInstance, me))
{
RespawnAssemblyOfIron(pInstance, me);
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
}
me->m_Events.AddEventAtOffset(new CastRunesEvent(*me), 8s);
}
@@ -568,7 +591,6 @@ struct boss_stormcaller_brundir : public ScriptedAI
{
SetInvincibility(false);
me->SetLootMode(0);
RespawnAssemblyOfIron(pInstance, me);
_channelTimer = 0;
_phase = 0;
@@ -580,8 +602,13 @@ struct boss_stormcaller_brundir : public ScriptedAI
me->SetDisableGravity(false);
me->SetRegeneratingHealth(true);
me->SetReactState(REACT_AGGRESSIVE);
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
if (!IsAnyAssemblyMemberEngaged(pInstance, me))
{
RespawnAssemblyOfIron(pInstance, me);
if (pInstance)
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
}
}
void JustReachedHome() override