Fix CMSG_REQUEST_VEHICLE_SWITCH_SEAT to allow change to accesory seat.

Patch by Havenard
Closes issue 1583

--HG--
branch : trunk
This commit is contained in:
Spp
2010-04-11 07:27:31 +02:00
parent ed72b887a0
commit ba28644e6f
+5 -1
View File
@@ -625,7 +625,11 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
if (vehicle_base->GetGUID() == guid) if (vehicle_base->GetGUID() == guid)
GetPlayer()->ChangeSeat(seatId); GetPlayer()->ChangeSeat(seatId);
} else if (Unit *vehUnit = Unit::GetUnit(*GetPlayer(), guid))
if (Vehicle *vehicle = vehUnit->GetVehicleKit())
if (vehicle->HasEmptySeat(seatId))
GetPlayer()->EnterVehicle(vehicle, seatId);
}
break; break;
default: default:
break; break;