mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core: VehicleJoinEvent crash fix (#23136)
(cherry picked from commit 73e3fdc8b4)
This commit is contained in:
@@ -778,6 +778,11 @@ bool VehicleJoinEvent::Execute(uint64, uint32)
|
||||
return true;
|
||||
}
|
||||
|
||||
//It's possible that multiple vehicle join
|
||||
//events are executed in the same update
|
||||
if (Passenger->GetVehicle())
|
||||
Passenger->ExitVehicle();
|
||||
|
||||
Passenger->SetVehicle(Target);
|
||||
Seat->second.Passenger.Guid = Passenger->GetGUID();
|
||||
Seat->second.Passenger.IsUnselectable = Passenger->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
Reference in New Issue
Block a user