mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Core/PacketIO: Updated and enabled CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE and updated structure of movement packet sent in CMSG_CAST_(PET_)SPELL
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "Player.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "MovementStructures.h"
|
||||
|
||||
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recvData)
|
||||
{
|
||||
@@ -71,22 +72,38 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData)
|
||||
case CMSG_REQUEST_VEHICLE_NEXT_SEAT:
|
||||
GetPlayer()->ChangeSeat(-1, true);
|
||||
break;
|
||||
/*case CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE:
|
||||
case CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE:
|
||||
{
|
||||
uint64 guid; // current vehicle guid
|
||||
recvData.readPackGUID(guid);
|
||||
static MovementStatusElements const accessoryGuid[] =
|
||||
{
|
||||
MSEExtraInt8,
|
||||
MSEHasGuidByte4,
|
||||
MSEHasGuidByte2,
|
||||
MSEHasGuidByte7,
|
||||
MSEHasGuidByte6,
|
||||
MSEHasGuidByte5,
|
||||
MSEHasGuidByte0,
|
||||
MSEHasGuidByte1,
|
||||
MSEHasGuidByte3,
|
||||
MSEGuidByte6,
|
||||
MSEGuidByte1,
|
||||
MSEGuidByte2,
|
||||
MSEGuidByte5,
|
||||
MSEGuidByte3,
|
||||
MSEGuidByte0,
|
||||
MSEGuidByte4,
|
||||
MSEGuidByte7,
|
||||
};
|
||||
|
||||
Movement::ExtraMovementStatusElement extra(accessoryGuid);
|
||||
MovementInfo movementInfo;
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
GetPlayer()->ReadMovementInfo(recvData, &movementInfo, &extra);
|
||||
vehicle_base->m_movementInfo = movementInfo;
|
||||
|
||||
uint64 accessory; // accessory guid
|
||||
recvData.readPackGUID(accessory);
|
||||
uint64 accessory = extra.Data.guid;
|
||||
int8 seatId = extra.Data.byteData;
|
||||
|
||||
int8 seatId;
|
||||
recvData >> seatId;
|
||||
|
||||
if (vehicle_base->GetGUID() != guid)
|
||||
if (vehicle_base->GetGUID() != movementInfo.guid)
|
||||
return;
|
||||
|
||||
if (!accessory)
|
||||
@@ -98,7 +115,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData)
|
||||
vehUnit->HandleSpellClick(GetPlayer(), seatId);
|
||||
}
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
case CMSG_REQUEST_VEHICLE_SWITCH_SEAT:
|
||||
{
|
||||
uint64 guid; // current vehicle guid
|
||||
|
||||
Reference in New Issue
Block a user