mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
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:
@@ -135,6 +135,22 @@ static uint8 CountAliveBosses(InstanceScript* instance)
|
|||||||
return count;
|
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)
|
bool IsEncounterComplete(InstanceScript* pInstance, Creature* me)
|
||||||
{
|
{
|
||||||
if (!pInstance || !me)
|
if (!pInstance || !me)
|
||||||
@@ -186,12 +202,16 @@ struct boss_steelbreaker : public ScriptedAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
RespawnAssemblyOfIron(pInstance, me);
|
|
||||||
|
|
||||||
_phase = 0;
|
_phase = 0;
|
||||||
events.Reset();
|
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
|
void JustReachedHome() override
|
||||||
@@ -376,14 +396,17 @@ struct boss_runemaster_molgeim : public ScriptedAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
RespawnAssemblyOfIron(pInstance, me);
|
|
||||||
|
|
||||||
_phase = 0;
|
_phase = 0;
|
||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|
||||||
if (pInstance)
|
if (!IsAnyAssemblyMemberEngaged(pInstance, me))
|
||||||
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
|
{
|
||||||
|
RespawnAssemblyOfIron(pInstance, me);
|
||||||
|
if (pInstance)
|
||||||
|
pInstance->SetBossState(BOSS_ASSEMBLY, NOT_STARTED);
|
||||||
|
}
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset(new CastRunesEvent(*me), 8s);
|
me->m_Events.AddEventAtOffset(new CastRunesEvent(*me), 8s);
|
||||||
}
|
}
|
||||||
@@ -568,7 +591,6 @@ struct boss_stormcaller_brundir : public ScriptedAI
|
|||||||
{
|
{
|
||||||
SetInvincibility(false);
|
SetInvincibility(false);
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
RespawnAssemblyOfIron(pInstance, me);
|
|
||||||
|
|
||||||
_channelTimer = 0;
|
_channelTimer = 0;
|
||||||
_phase = 0;
|
_phase = 0;
|
||||||
@@ -580,8 +602,13 @@ struct boss_stormcaller_brundir : public ScriptedAI
|
|||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
me->SetRegeneratingHealth(true);
|
me->SetRegeneratingHealth(true);
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
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
|
void JustReachedHome() override
|
||||||
|
|||||||
Reference in New Issue
Block a user