Core/PacketIO: Name previously unknown fields in lfg packets

This commit is contained in:
Shauren
2020-08-06 22:08:21 +02:00
parent 3c28573d02
commit e240e5936a
3 changed files with 17 additions and 9 deletions

View File

@@ -317,12 +317,12 @@ void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
data << uint8(size > 0); // Is joined in LFG
if (size)
{
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(0); // NoPartialClear
data << uint8(0); // Achievements
data << uint8(size);
for (lfg::LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
@@ -358,15 +358,15 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
data << uint8(size > 0); // Is joined in LFG
if (size)
{
data << uint8(join); // LFG Join
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(0); // NoPartialClear
data << uint8(0); // Achievements
for (uint8 i = 0; i < 3; ++i)
data << uint8(0); // unk - Always 0
data << uint8(0); // Needs
data << uint8(size);
for (lfg::LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)

View File

@@ -20,10 +20,15 @@
void WorldPackets::LFG::LFGJoin::Read()
{
_worldPacket >> Roles;
_worldPacket.read_skip<uint16>();
_worldPacket >> NoPartialClear;
_worldPacket >> Achievements;
Slots.resize(_worldPacket.read<uint8>());
for (uint32& slot : Slots)
_worldPacket >> slot;
_worldPacket.read_skip<uint32>();
_worldPacket.read_skip<uint8>(); // Needs count, hardcoded to 3 in client
for (uint8& needs : Needs)
_worldPacket >> needs;
_worldPacket >> Comment;
}

View File

@@ -33,6 +33,9 @@ namespace WorldPackets::LFG
uint32 Roles = 0;
Array<uint32, 50> Slots;
std::string Comment;
bool NoPartialClear = false;
bool Achievements = false;
std::array<uint8, 3> Needs = { };
};
class LFGLeave final : public ClientPacket