summaryrefslogtreecommitdiff
path: root/include/pso/TProtocol.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-03-09 18:09:14 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-03-09 18:09:14 -0400
commitdacfbade1476d79bf7484b8817592d61ba62ee2f (patch)
treeebf296e1e152fcfc09aeab9488f0d57e2b6211e7 /include/pso/TProtocol.h
parentb80218a8c1fafb174e3f05c0b51c61005531bf05 (diff)
TProtocol: Start adding, and matching more command handlers
Also found out alot more assumptions I had were wrong.
Diffstat (limited to 'include/pso/TProtocol.h')
-rw-r--r--include/pso/TProtocol.h47
1 files changed, 17 insertions, 30 deletions
diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h
index 9d24830..628ee7f 100644
--- a/include/pso/TProtocol.h
+++ b/include/pso/TProtocol.h
@@ -19,6 +19,7 @@
#include <pso/TTcpSocket.h>
EXTERN_OBJECT_NAME(TProtocol);
+extern TPlyMeetUserExtension meet_user_settings;
extern void copy_packet(struct packet *pkt);
struct packet {
@@ -31,36 +32,18 @@ struct packet {
};
};
-struct GameListEntry {
- u8 difficulty_tag;
- u8 num_players;
- char name[16];
- u8 episode;
- u8 flags;
-};
-
-struct LobbyListEntry {
- u32 smth;
-};
-
-struct QuestListEntry {
- char name[32];
- char short_description[112];
-};
-
-
#define RECV_PACKET_HANDLERS \
o(handle_unused_login, void) \
- o(handle_03_recv_regist, void) \
- o(handle_04_recv_login, void) \
+ o(handle_03_recv_regist, u8 state) \
+ o(handle_04_recv_login, u8 error_code) \
o(handle_05_recv_logout, void) \
- o(handle_07_A0_A1_recv_dir_list, int entry_count, TMenuListEntry<GameListEntry> *entries, TMenuListEntry<GameListEntry> &entry_0) \
- o(handle_08_recv_game_list, int entry_count, TMenuListEntry<GameListEntry> *entries, TMenuListEntry<GameListEntry> &entry_0) \
+ o(handle_07_A0_A1_recv_dir_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
+ o(handle_08_recv_game_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
o(handle_01_recv_error, char *mesg) \
o(handle_06_recv_chat, TPlyGuildCardTag &tag, char *mesg) \
o(handle_11_additional_info_reply_packet, void) \
- o(handle_1A_D5_large_message_box_packet, void) \
- o(handle_0E_recv_start_game, void) \
+ o(handle_1A_D5_recv_text, char *text) \
+ o(handle_0E_recv_start_game, TPlyJoinLobbyData *entries, u8 entry_count, int lobby_entry_idx) \
o(unused7, void) \
o(handle_64_join_game_packet, void) \
o(unused8, void) \
@@ -92,7 +75,7 @@ struct QuestListEntry {
o(handle_A6_download_quest_file_list_packet, void) \
o(handle_A7_download_quest_file_data_packet, void) \
o(unused11, void) \
- o(handle_1F_lobby_info_desk_list_packet, void) \
+ o(handle_1F_recv_info_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
o(handle_B0_server_message_packet, void) \
o(handle_88_player_arrow_color_list_packet, void) \
o(handle_8A_lobby_name_packet, void) \
@@ -142,10 +125,10 @@ public:
u8 m_unused3[80];
TPlyCharData m_character_data;
u32 m_unused4;
- TMenuListEntry<GameListEntry> m_game_entries[64];
- TMenuListEntry<GameListEntry> m_game_entries2[64];
- TMenuListEntry<LobbyListEntry> m_lobby_entries[16];
- TMenuListEntry<QuestListEntry> m_quest_entries[30];
+ GameListEntry m_game_entries[64];
+ GameListEntry m_game_entries2[64];
+ LobbyListEntry m_lobby_entries[16];
+ QuestListEntry m_quest_entries[30];
u8 m_unused5[128];
char m_serial_number3[17];
char m_password2[17];
@@ -174,6 +157,8 @@ public:
// Command handlers.
// 0x01
void recv_error(packet &pkt);
+ // 0x1A/0xD5
+ void recv_text(packet &pkt);
// 0x03
void recv_regist(packet &pkt);
// 0x04
@@ -182,10 +167,12 @@ public:
void recv_logout(packet &pkt);
// 0x06
void recv_chat(packet &pkt);
- // 0x07
+ // 0x07/0xA0/0xA1
void recv_dir_list(packet &pkt);
// 0x08
void recv_game_list(packet &pkt);
+ // 0x1F
+ void recv_info_list(packet &pkt);
// 0x0E
void recv_start_game(packet &pkt);
};