mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/CoS): Fix chest despawning when player leaves map (#23112)
This commit is contained in:
@@ -1154,16 +1154,7 @@ public:
|
||||
if (GameObject* go = pInstance->instance->GetGameObject(pInstance->GetGuidData(DATA_EXIT_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (!me->GetMap()->GetPlayers().IsEmpty())
|
||||
{
|
||||
if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
|
||||
{
|
||||
if (GameObject* chest = player->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 0))
|
||||
{
|
||||
chest->SetLootRecipient(me->GetMap());
|
||||
}
|
||||
}
|
||||
}
|
||||
pInstance->instance->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 7 * DAY * IN_MILLISECONDS);
|
||||
}
|
||||
ScheduleNextEvent(currentEvent, 10000);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user