diff --git a/dChatServer/ChatPacketHandler.cpp b/dChatServer/ChatPacketHandler.cpp index e4cc38cb..84f0ac67 100644 --- a/dChatServer/ChatPacketHandler.cpp +++ b/dChatServer/ChatPacketHandler.cpp @@ -717,27 +717,26 @@ void ChatPacketHandler::HandleGuildGetAll(Packet* packet) { //portion that will get routed: BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::GUILD_DATA); - bitStream.Write(0); - bitStream.Write(LUWString(guild->name, 31)); - bitStream.Write(LUWString("test1", 11)); - bitStream.Write(LUWString("test2", 11)); - bitStream.Write(69); - bitStream.Write(0); - bitStream.Write(1); - bitStream.Write(0); - constexpr int32_t sizeThing = 100; - bitStream.Write(sizeThing); // Size + bitStream.Write(0); // has Guild data/in a guild + bitStream.Write(LUWString(guild->name, 31)); // guild name + bitStream.Write(LUWString("test1", 11)); // unknown + bitStream.Write(LUWString("test2", 11)); // unknown + bitStream.Write(69); // unknown + bitStream.Write(0); // unknown + bitStream.Write(1); // unknown + bitStream.Write(0); // unknown + bitStream.Write(members.size()); // Size //Member data - for (int i = 0; i < sizeThing; i++) { - bitStream.Write(4); // rank + for (const auto &member : members) { + bitStream.Write(member.rank); // rank bitStream.Write(1); // online status bitStream.Write(1100); // zone bitStream.Write(1200); // instance bitStream.Write(1300); // clone - bitStream.Write(1200); // 4 - bitStream.Write(player->playerID + i); // playerId - bitStream.Write(LUWString((i % 2 == 0 ? "abcdefghijklmnopqrstuvw" : "ABCDEFGHIJKLMNOPQRSTUVW"), 24)); // 16 - bitStream.Write(0); // unknown + bitStream.Write(1200); // unknown + bitStream.Write(player->playerID); // playerId + bitStream.Write(LUWString(player->playerName, 24)); // playername Wchar[24] + bitStream.Write(0); // null terminator for playername bitStream.Write(0); // unknown bitStream.Write(0); // unknown }