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:
@@ -293,14 +293,17 @@ struct boss_freya : public BossAI
|
|||||||
++_elderCount;
|
++_elderCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 chestId = RAID_MODE(GO_FREYA_CHEST, GO_FREYA_CHEST_HERO);
|
// Summon the chest via spell so it is a wild object not owned by Freya,
|
||||||
chestId -= 2 * _elderCount; // offset
|
// otherwise it despawns with her when she teleports out. The spell is
|
||||||
|
// chosen by raid size and how many Elders empowered her.
|
||||||
if (GameObject* go = me->SummonGameObject(chestId, 2345.61f, -71.20f, 425.104f, 3.0f, 0, 0, 0, 0, 0))
|
static constexpr uint32 summonChestSpell[2][4] =
|
||||||
{
|
{
|
||||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
// 0 Elder, 1 Elder, 2 Elder, 3 Elder
|
||||||
go->SetLootRecipient(me->GetMap());
|
{ 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
|
// Defeat credit
|
||||||
me->CastSpell(me, 65074, true); // credit
|
me->CastSpell(me, 65074, true); // credit
|
||||||
|
|||||||
@@ -233,8 +233,6 @@ enum UlduarGameObjects
|
|||||||
GO_HODIR_CHEST_NORMAL_HERO = 194308,
|
GO_HODIR_CHEST_NORMAL_HERO = 194308,
|
||||||
GO_HODIR_CHEST_HARD = 194200,
|
GO_HODIR_CHEST_HARD = 194200,
|
||||||
GO_HODIR_CHEST_HARD_HERO = 194201,
|
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 = 194789,
|
||||||
GO_MIMIRON_CHEST_HARD = 194957,
|
GO_MIMIRON_CHEST_HARD = 194957,
|
||||||
GO_MIMIRON_CHEST_HERO = 194956,
|
GO_MIMIRON_CHEST_HERO = 194956,
|
||||||
|
|||||||
Reference in New Issue
Block a user