From c7d78b5ff930b433c7f09471e825b79e6d9bee4f Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 17 Apr 2009 15:08:58 -0500 Subject: *Some work on vehicles. --HG-- branch : trunk --- src/game/MovementHandler.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/game/MovementHandler.cpp') diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 64c4fecdb53..50152de4e97 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -338,9 +338,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) { if(Map *map = mover->GetMap()) { - //if(GetPlayer()->m_seer != mover) - if(((Creature*)mover)->isVehicle()) - map->PlayerRelocation(GetPlayer(), movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o); map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o); } mover->SetUnitMovementFlags(movementInfo.flags); @@ -482,10 +479,33 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data) // using charm guid, because we don't have vehicle guid... if(Vehicle *vehicle = ObjectAccessor::GetVehicle(vehicleGUID)) { - _player->ExitVehicle(vehicle); + vehicle->RemovePassenger(_player); } } +void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) +{ + sLog.outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE"); + recv_data.hexlike(); + uint32 a; + uint16 b; + uint16 c; + uint32 d,e,f,g,h,i,j,k; + int8 seat; + recv_data >> a >> b >> c; + recv_data >> d >> e >> f >> g >> h >> i >> j >> k; + recv_data >> seat; + //sLog.outError("change seat %u %u %u %u %u %u %u %u %u %u %u %u", a, b,c,d,e,f,g,h,i,j,k,seat); +} + +void WorldSession::HandleRequestVehicleExit(WorldPacket &recv_data) +{ + sLog.outDebug("WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT"); + recv_data.hexlike(); + if(GetPlayer()->m_Vehicle) + GetPlayer()->m_Vehicle->RemovePassenger(GetPlayer()); +} + void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/) { //sLog.outDebug("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM"); -- cgit v1.2.3