diff options
author | megamage <none@none> | 2009-04-17 15:08:58 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-17 15:08:58 -0500 |
commit | c7d78b5ff930b433c7f09471e825b79e6d9bee4f (patch) | |
tree | 127c9aed7e8ac65d379ac4bcdd18fc73049e3e37 /src/game/MovementHandler.cpp | |
parent | af935468df3af499bcae5018845ea6609f026a5b (diff) |
*Some work on vehicles.
--HG--
branch : trunk
Diffstat (limited to 'src/game/MovementHandler.cpp')
-rw-r--r-- | src/game/MovementHandler.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
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"); |