mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Vehicles: Fixed assertion failures related to seat changes, huge thanks to Machiavelli for well documented vehicle code and j4r0d for providing info how to reproduce the crash
This commit is contained in:
@@ -100,7 +100,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
{
|
||||
if (Vehicle *vehicle = vehUnit->GetVehicleKit())
|
||||
if (vehicle->HasEmptySeat(seatId))
|
||||
GetPlayer()->_EnterVehicle(vehicle, seatId);
|
||||
vehUnit->HandleSpellClick(GetPlayer(), seatId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
else if (Unit *vehUnit = Unit::GetUnit(*GetPlayer(), guid))
|
||||
if (Vehicle *vehicle = vehUnit->GetVehicleKit())
|
||||
if (vehicle->HasEmptySeat(seatId))
|
||||
GetPlayer()->_EnterVehicle(vehicle, seatId);
|
||||
vehUnit->HandleSpellClick(GetPlayer(), seatId);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user