fix(Scripts/Ulduar): despawn Freya's Strengthened Iron Roots on wipe and defeat (#27286)

This commit is contained in:
Andrew
2026-08-24 20:21:44 -03:00
committed by GitHub
parent cf2c99f8a8
commit 084c9e2bf1
3 changed files with 17 additions and 2 deletions
@@ -996,6 +996,19 @@ struct boss_freya_iron_root : public NullCreatureAI
boss_freya_iron_root(Creature* pCreature) : NullCreatureAI(pCreature) { }
void JustDied(Unit* /*killer*/) override
{
ReleaseRootedPlayer();
}
// The root aura is infinite and self-cast by the victim, so nothing engine-side
// removes it; a root despawned without being killed must free its victim too
void OnDespawn() override
{
ReleaseRootedPlayer();
}
private:
void ReleaseRootedPlayer()
{
if (!me->IsSummon())
return;
@@ -168,8 +168,9 @@ ObjectData const gameobjectData[] =
ObjectData const summonData[] =
{
{ NPC_SARONITE_ANIMUS, BOSS_VEZAX }, // summoned by a Saronite Vapor, not Vezax
{ 0, 0 }
{ NPC_SARONITE_ANIMUS, BOSS_VEZAX }, // summoned by a Saronite Vapor, not Vezax
{ NPC_STRENGTHENED_IRON_ROOTS, BOSS_FREYA }, // summoned by the rooted player, not Freya
{ 0, 0 }
};
BossBoundaryData const boundaries =
@@ -173,6 +173,7 @@ enum UlduarNPCs
NPC_HODIR = 32845,
NPC_THORIM = 32865,
NPC_FREYA = 32906,
NPC_STRENGTHENED_IRON_ROOTS = 33168,
NPC_VEZAX = 33271,
NPC_SARONITE_ANIMUS = 33524,
NPC_SARA = 33134,