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
This commit is contained in:
1 parent
e5258f92c8
commit
b574c99549
2 files changed
+18
-16
No files matched your search
@@ -690,22 +690,7 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
{
|
{
|
||||||
case BOSS_LEVIATHAN:
|
case BOSS_LEVIATHAN:
|
||||||
if (state == DONE)
|
if (state == DONE)
|
||||||
{
|
_events.ScheduleEvent(EVENT_DESPAWN_LEVIATHAN_VEHICLES, 5 * IN_MILLISECONDS);
|
||||||
// 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;
|
break;
|
||||||
case BOSS_IGNIS:
|
case BOSS_IGNIS:
|
||||||
case BOSS_RAZORSCALE:
|
case BOSS_RAZORSCALE:
|
||||||
@@ -1164,6 +1149,22 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
algalon->AI()->DoAction(EVENT_DESPAWN_ALGALON);
|
algalon->AI()->DoAction(EVENT_DESPAWN_ALGALON);
|
||||||
}
|
}
|
||||||
break;
|
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_DESPAWN_ALGALON = 1,
|
||||||
EVENT_UPDATE_ALGALON_TIMER = 2,
|
EVENT_UPDATE_ALGALON_TIMER = 2,
|
||||||
ACTION_INIT_ALGALON = 6,
|
ACTION_INIT_ALGALON = 6,
|
||||||
|
EVENT_DESPAWN_LEVIATHAN_VEHICLES = 7
|
||||||
};
|
};
|
||||||
|
|
||||||
enum YoggSaronIllusions
|
enum YoggSaronIllusions
|
||||||
|
|||||||
Reference in new issue
Block a user