Core/Vehicles: Make the vehicle system more aura driven. Get rid of redundant checks and update relevant data.
Closes #805
This commit is contained in:
@@ -99,7 +99,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
{
|
||||
if (Vehicle *vehicle = vehUnit->GetVehicleKit())
|
||||
if (vehicle->HasEmptySeat(seatId))
|
||||
GetPlayer()->EnterVehicle(vehicle, seatId);
|
||||
GetPlayer()->_EnterVehicle(vehicle, seatId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -116,7 +116,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);
|
||||
GetPlayer()->_EnterVehicle(vehicle, seatId);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -200,7 +200,6 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
|
||||
{
|
||||
ASSERT(GetPlayer() == vehicle->GetBase());
|
||||
unit->ExitVehicle();
|
||||
unit->AddObjectToRemoveList();
|
||||
}
|
||||
else
|
||||
sLog->outError("Player %u attempted to eject creature GUID %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
|
||||
|
||||
Reference in New Issue
Block a user