Core: VehicleJoinEvent crash fix
This commit is contained in:
1 parent
4be112576c
commit
b7f23d8e01
1 file changed
+5
@@ -853,6 +853,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->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
Reference in new issue
Block a user