Fix CMSG_DISMISS_CONTROLLED_VEHICLE

This commit is contained in:
Yaki Khadafi 2015-02-03 06:09:47 +00:00 committed by Antz
parent 13316a27d1
commit 8ac672ae86
2 changed files with 76 additions and 4 deletions

View file

@ -37,10 +37,8 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvPacket)
DEBUG_LOG("WORLD: Received opcode CMSG_DISMISS_CONTROLLED_VEHICLE");
recvPacket.hexlike();
ObjectGuid vehicleGuid;
MovementInfo movementInfo; // Not used at the moment
recvPacket >> vehicleGuid.ReadAsPacked();
recvPacket >> movementInfo;
TransportInfo* transportInfo = _player->GetTransportInfo();
@ -50,7 +48,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvPacket)
Unit* vehicle = (Unit*)transportInfo->GetTransport();
// Something went wrong
if (vehicleGuid != vehicle->GetObjectGuid())
if (movementInfo.GetGuid() != vehicle->GetObjectGuid())
return;
// Remove Vehicle Control Aura

View file

@ -2486,6 +2486,78 @@ MovementStatusElements MoveNotActiveMoverSequence[] =
MSEEnd,
};
MovementStatusElements DismissControlledVehicleSequence[] =
{
MSEPositionY,
MSEPositionZ,
MSEPositionX,
MSEHasSplineElevation,
MSEHasFallData,
MSEHasTransportData,
MSEGuidBit4,
MSEGuidBit7,
MSEHasMovementFlags2,
MSEGuidBit2,
MSEHasOrientation,
MSEGuidBit0,
MSEGuidBit6,
MSEHasPitch,
MSEHasTimestamp,
MSEGuidBit1,
MSEHasUnknownBit,
MSEHasSpline,
MSEGuidBit3,
MSEHasMovementFlags,
MSEGuidBit5,
MSETransportGuidBit5,
MSEHasTransportTime3,
MSETransportGuidBit2,
MSETransportGuidBit0,
MSETransportGuidBit7,
MSETransportGuidBit3,
MSETransportGuidBit4,
MSETransportGuidBit1,
MSETransportGuidBit6,
MSEHasTransportTime2,
MSEFlags2,
MSEHasFallDirection,
MSEFlags,
MSEGuidByte6,
MSEGuidByte3,
MSEGuidByte1,
MSEGuidByte5,
MSEGuidByte2,
MSEGuidByte4,
MSEGuidByte7,
MSEGuidByte0,
MSETimestamp,
MSETransportTime3,
MSETransportGuidByte4,
MSETransportGuidByte7,
MSETransportTime2,
MSETransportGuidByte6,
MSETransportTime,
MSETransportPositionZ,
MSETransportGuidByte0,
MSETransportPositionX,
MSETransportGuidByte3,
MSETransportSeat,
MSETransportPositionY,
MSETransportPositionO,
MSETransportGuidByte1,
MSETransportGuidByte5,
MSETransportGuidByte2,
MSEFallTime,
MSEFallHorizontalSpeed,
MSEFallSinAngle,
MSEFallCosAngle,
MSEFallVerticalSpeed,
MSEPositionO,
MSESplineElevation,
MSEPitch,
MSEEnd,
};
MovementStatusElements* GetMovementStatusElementsSequence(uint16 opcode)
{
switch (opcode)
@ -2558,6 +2630,8 @@ MovementStatusElements* GetMovementStatusElementsSequence(uint16 opcode)
return MoveUpdateKnockBackSequence;
case CMSG_MOVE_NOT_ACTIVE_MOVER:
return MoveNotActiveMoverSequence;
case CMSG_DISMISS_CONTROLLED_VEHICLE:
return DismissControlledVehicleSequence;
}
return NULL;
}