fix(Scripts/Ulduar): keep Freya's loot chest from despawning early (#26476)

Co-authored-by: Machiavelli <machiavelli.trinity@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-07-05 06:37:06 -03:00
committed by GitHub
parent b79f7c3312
commit 2ca73b789f
2 changed files with 10 additions and 9 deletions
@@ -293,14 +293,17 @@ struct boss_freya : public BossAI
++_elderCount;
}
uint32 chestId = RAID_MODE(GO_FREYA_CHEST, GO_FREYA_CHEST_HERO);
chestId -= 2 * _elderCount; // offset
if (GameObject* go = me->SummonGameObject(chestId, 2345.61f, -71.20f, 425.104f, 3.0f, 0, 0, 0, 0, 0))
// Summon the chest via spell so it is a wild object not owned by Freya,
// otherwise it despawns with her when she teleports out. The spell is
// chosen by raid size and how many Elders empowered her.
static constexpr uint32 summonChestSpell[2][4] =
{
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
go->SetLootRecipient(me->GetMap());
}
// 0 Elder, 1 Elder, 2 Elder, 3 Elder
{ 62950, 62952, 62953, 62954 }, // 10-man
{ 62955, 62956, 62957, 62958 } // 25-man
};
me->CastSpell(me, summonChestSpell[me->GetMap()->Is25ManRaid() ? 1 : 0][_elderCount], true);
// Defeat credit
me->CastSpell(me, 65074, true); // credit
@@ -233,8 +233,6 @@ enum UlduarGameObjects
GO_HODIR_CHEST_NORMAL_HERO = 194308,
GO_HODIR_CHEST_HARD = 194200,
GO_HODIR_CHEST_HARD_HERO = 194201,
GO_FREYA_CHEST = 194330, // Normal, -2 - elder offset
GO_FREYA_CHEST_HERO = 194331, // Hero, -2 - elder offset
GO_MIMIRON_CHEST = 194789,
GO_MIMIRON_CHEST_HARD = 194957,
GO_MIMIRON_CHEST_HERO = 194956,