mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Scripts/Ulduar: Fix Flame Leviathan instance lock
Fix Flame Leviathan instance lock not being granted to players because they were ejected from the vehicles as soon as boss died.
Players are now ejected some seconds later.
Close https://github.com/TrinityCore/TrinityCore/issues/15005
(cherry picked from commit b574c99549)
This commit is contained in:
@@ -690,22 +690,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
case BOSS_LEVIATHAN:
|
||||
if (state == DONE)
|
||||
{
|
||||
// Eject all players from vehicles and make them untargetable.
|
||||
// They will be despawned after a while
|
||||
for (auto const& vehicleGuid : LeviathanVehicleGUIDs)
|
||||
{
|
||||
if (Creature* vehicleCreature = instance->GetCreature(vehicleGuid))
|
||||
{
|
||||
if (Vehicle* vehicle = vehicleCreature->GetVehicleKit())
|
||||
{
|
||||
vehicle->RemoveAllPassengers();
|
||||
vehicleCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
vehicleCreature->DespawnOrUnsummon(5 * MINUTE * IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_DESPAWN_LEVIATHAN_VEHICLES, 5 * IN_MILLISECONDS);
|
||||
break;
|
||||
case BOSS_IGNIS:
|
||||
case BOSS_RAZORSCALE:
|
||||
@@ -1164,6 +1149,22 @@ class instance_ulduar : public InstanceMapScript
|
||||
algalon->AI()->DoAction(EVENT_DESPAWN_ALGALON);
|
||||
}
|
||||
break;
|
||||
case EVENT_DESPAWN_LEVIATHAN_VEHICLES:
|
||||
// Eject all players from vehicles and make them untargetable.
|
||||
// They will be despawned after a while
|
||||
for (auto const& vehicleGuid : LeviathanVehicleGUIDs)
|
||||
{
|
||||
if (Creature* vehicleCreature = instance->GetCreature(vehicleGuid))
|
||||
{
|
||||
if (Vehicle* vehicle = vehicleCreature->GetVehicleKit())
|
||||
{
|
||||
vehicle->RemoveAllPassengers();
|
||||
vehicleCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
vehicleCreature->DespawnOrUnsummon(5 * MINUTE * IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,6 +404,7 @@ enum UlduarEvents
|
||||
EVENT_DESPAWN_ALGALON = 1,
|
||||
EVENT_UPDATE_ALGALON_TIMER = 2,
|
||||
ACTION_INIT_ALGALON = 6,
|
||||
EVENT_DESPAWN_LEVIATHAN_VEHICLES = 7
|
||||
};
|
||||
|
||||
enum YoggSaronIllusions
|
||||
|
||||
Reference in New Issue
Block a user