wire: guild packets and DisplayGuildCreateBox as structs

The guild packets of the 1.10.64 client (docs/Guilds.md) as Serialize/Deserialize structs, laid out the way the client's
packet handlers read them: GUILD_CREATE_RESPONSE, GUILD_INVITE, GUILD_INVITE_INITIAL_RESPONSE, _FINAL_RESPONSE,
_CONFIRM, GUILD_ADD_PLAYER, GUILD_REMOVE_PLAYER, GUILD_LOGIN_LOGOUT and GUILD_DATA (ClientPackets), the world packet
TMP_GUILD_CREATE the create box sends, the chat packets the client sends through its world (GUILD_INVITE,
GUILD_INVITE_RESPONSE, GUILD_LEAVE, GUILD_GET_ALL), DLU's world <-> chat packets (GUILD_CREATE, GUILD_KICK,
GUILD_GET_STATUS as the chat server's guild update to a world, and GUILD_SET_RANK and GUILD_DISBAND appended to
MessageType::Chat after CREATE_TEAM) and the game message DisplayGuildCreateBox (626). Fixed-size names always keep a
NUL, since the client reads them as C strings. Enums eGuildCreateResponse, eGuildInviteResponse,
eGuildInviteFinalResponse, eGuildRank and eGuildLeaveReason. Nothing sends them yet.

Check: GuildPacketsTests compares every packet with the bytes at the client's offsets. Nothing to check in game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 05:40:53 -05:00
parent 88ebdf685e
commit 130f3566cc
14 changed files with 905 additions and 0 deletions

View File

@@ -251,4 +251,12 @@ namespace GameMessages {
bool Help::Deserialize(RakNet::BitStream& bitStream) {
return bitStream.Read(helpId);
}
void DisplayGuildCreateBox::Serialize(RakNet::BitStream& bitStream) const {
bitStream.Write(bShow);
}
bool DisplayGuildCreateBox::Deserialize(RakNet::BitStream& bitStream) {
return bitStream.Read(bShow);
}
}

View File

@@ -183,6 +183,16 @@ namespace GameMessages {
eHelpType helpId{ eHelpType::NONE };
};
// Server -> client, to one client. Opens the guild create box (the client ignores bShow and always opens it).
// Live sent it from the Guild Master NPC's script (LOT 3001, L_GUILD_CREATE.lua); see docs/Guilds.md.
struct DisplayGuildCreateBox : public NetGameMsg {
DisplayGuildCreateBox() : NetGameMsg(MessageType::Game::DISPLAY_GUILD_CREATE_BOX) {}
void Serialize(RakNet::BitStream& bitStream) const override;
bool Deserialize(RakNet::BitStream& bitStream) override;
bool bShow{ true };
};
}
#endif // PLAYERMESSAGES_H