diff --git a/src/game/WorldHandlers/VehicleHandler.cpp b/src/game/WorldHandlers/VehicleHandler.cpp index 133153a6e..e98df58c2 100644 --- a/src/game/WorldHandlers/VehicleHandler.cpp +++ b/src/game/WorldHandlers/VehicleHandler.cpp @@ -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 diff --git a/src/game/movement/MovementStructures.h b/src/game/movement/MovementStructures.h index 5a7a62319..b40f6e20f 100644 --- a/src/game/movement/MovementStructures.h +++ b/src/game/movement/MovementStructures.h @@ -2486,9 +2486,81 @@ 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) + switch (opcode) { case CMSG_CAST_SPELL: case CMSG_PET_CAST_SPELL: @@ -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; }