Core/Packets: updated account data packets to 10.2.6 which shares their structure with 4.4.0

This commit is contained in:
Ovahlord
2024-06-06 14:04:40 +02:00
parent be00f49a12
commit 59501586ce
2 changed files with 8 additions and 8 deletions

View File

@@ -37,15 +37,15 @@ WorldPacket const* WorldPackets::ClientConfig::ClientCacheVersion::Write()
void WorldPackets::ClientConfig::RequestAccountData::Read()
{
_worldPacket >> PlayerGuid;
DataType = _worldPacket.ReadBits(4);
_worldPacket >> DataType;
}
WorldPacket const* WorldPackets::ClientConfig::UpdateAccountData::Write()
{
_worldPacket << Player;
_worldPacket << Time;
_worldPacket << uint32(Size);
_worldPacket.WriteBits(DataType, 4);
_worldPacket << Player;
_worldPacket << int32(DataType);
_worldPacket << uint32(CompressedData.size());
_worldPacket.append(CompressedData);
@@ -54,10 +54,10 @@ WorldPacket const* WorldPackets::ClientConfig::UpdateAccountData::Write()
void WorldPackets::ClientConfig::UserClientUpdateAccountData::Read()
{
_worldPacket >> PlayerGuid;
_worldPacket >> Time;
_worldPacket >> Size;
DataType = _worldPacket.ReadBits(4);
_worldPacket >> PlayerGuid;
_worldPacket >> DataType;
uint32 compressedSize = _worldPacket.read<uint32>();
if (compressedSize > _worldPacket.size() - _worldPacket.rpos())

View File

@@ -56,7 +56,7 @@ namespace WorldPackets
void Read() override;
ObjectGuid PlayerGuid;
uint8 DataType = 0; ///< @see enum AccountDataType
int32 DataType = 0; ///< @see enum AccountDataType
};
class UpdateAccountData final : public ServerPacket
@@ -69,7 +69,7 @@ namespace WorldPackets
ObjectGuid Player;
Timestamp<> Time;
uint32 Size = 0; ///< decompressed size
uint8 DataType = 0; ///< @see enum AccountDataType
int32 DataType = 0; ///< @see enum AccountDataType
ByteBuffer CompressedData;
};
@@ -83,7 +83,7 @@ namespace WorldPackets
ObjectGuid PlayerGuid;
Timestamp<> Time;
uint32 Size = 0; ///< decompressed size
uint8 DataType = 0; ///< @see enum AccountDataType
int32 DataType = 0; ///< @see enum AccountDataType
ByteBuffer CompressedData;
};