diff options
author | megamage <none@none> | 2009-04-23 21:43:20 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-23 21:43:20 -0500 |
commit | 84e9ffb48798f622872a0a5f1e33cd24021b51e0 (patch) | |
tree | f79da25bcdc2de015b955739358e3dfa426ea715 /src/game/MovementHandler.cpp | |
parent | 17056452d78689535b7a264ec371b849828d9300 (diff) |
*Set mover based on client response.
--HG--
branch : trunk
Diffstat (limited to 'src/game/MovementHandler.cpp')
-rw-r--r-- | src/game/MovementHandler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 741ad15b08a..d9c58967150 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -431,13 +431,15 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) { sLog.outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER"); - recv_data.hexlike(); CHECK_PACKET_SIZE(recv_data, 8); uint64 guid; recv_data >> guid; + if(guid == GetPlayer()->m_mover->GetGUID()) + return; + if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) GetPlayer()->SetMover(mover); else @@ -450,18 +452,17 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) { sLog.outDebug("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER"); - recv_data.hexlike(); CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+8); uint64 old_mover_guid; recv_data >> old_mover_guid; - if(_player->m_mover->GetGUID() == old_mover_guid) + /*if(_player->m_mover->GetGUID() == old_mover_guid) { sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " I64FMT, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); return; - } + }*/ MovementInfo mi; ReadMovementInfo(recv_data, &mi); @@ -519,10 +520,8 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) { GetPlayer()->m_Vehicle = vehicle; GetPlayer()->SetClientControl(vehicle, 1); - if(!vehicle->AddPassenger(GetPlayer(), seatNum)) - assert(false); - //WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); - //GetPlayer()->GetSession()->SendPacket(&data); + WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); + GetPlayer()->GetSession()->SendPacket(&data); } else if(!vehicle->AddPassenger(GetPlayer(), seatNum)) assert(false); |