From a77eec717e08422876315fbd81afb5d492b75315 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 29 May 2023 16:36:07 -0300 Subject: TProtocol: Add (and match) recv_{burst,exit}_{game,lobby}() --- include/pso/TProtocol.h | 16 ++++++++++++---- include/pso/packet_classes.h | 31 ++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 13 deletions(-) (limited to 'include/pso') diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h index ca80ffe..041cd56 100644 --- a/include/pso/TProtocol.h +++ b/include/pso/TProtocol.h @@ -65,10 +65,10 @@ struct packet : public flex_packet<0x7c00> {}; o(handle_67_recv_start_lobby2, TPlyJoinLobbyEntry *entries, u8 entry_count, int client_id, int leader_id, int lobby_number, int block_number, int smth, int event) \ o(handle_80_recv_generate_id, TRecvGenerateID gen_id) \ o(unused9, void) \ - o(handle_65_add_player_to_game_packet, void) \ - o(handle_66_player_left_game_packet, void) \ - o(handle_68_add_player_to_lobby_packet, void) \ - o(handle_69_player_left_lobby_packet, void) \ + o(handle_65_recv_burst_game, TPlyJoinLobbyEntry *entries, int leader_id, int disable_udp) \ + o(handle_66_recv_exit_game, int client_id, int leader_id, int disable_udp) \ + o(handle_68_recv_burst_lobby, TPlyJoinLobbyEntry *entries, int leader_id) \ + o(handle_69_recv_exit_lobby, int client_id, int leader_id) \ o(handle_18_90_9A_login_response_packet, void) \ o(handle_92_9C_register_response_packet, void) \ o(unused10, void) \ @@ -243,6 +243,14 @@ public: void recv_quest_info(packet &pkt); // 0xB0 void recv_emergency_call(packet &pkt); + // 0x65 + void recv_burst_game(packet &pkt); + // 0x66 + void recv_exit_game(packet &pkt); + // 0x68 + void recv_burst_lobby(packet &pkt); + // 0x69 + void recv_exit_lobby(packet &pkt); // Send command handlers. // 0x03 diff --git a/include/pso/packet_classes.h b/include/pso/packet_classes.h index d49c49a..9cd9800 100644 --- a/include/pso/packet_classes.h +++ b/include/pso/packet_classes.h @@ -233,6 +233,19 @@ _TSendAction(3, #undef _TSendAction #endif +template +class TRecvExit { +public: + packet_header header; + char client_id; + char leader_id; + char disable_udp; +public: + void bswap() { + header.bswap(); + }; +}; + class TRegister { public: packet_header header; @@ -446,15 +459,15 @@ public: class TPlyJoinLobby { public: packet_header header; - u8 client_id; - u8 leader_id; - u8 disable_udp; - u8 lobby_number; - u8 block_number; - u8 unknown1; - u8 event; - u8 unknown2; - u8 unused[4]; + char client_id; + char leader_id; + char disable_udp; + char lobby_number; + char block_number; + char unknown1; + char event; + char unknown2; + char unused[4]; TPlyJoinLobbyEntry entries[12]; public: void bswap() { -- cgit v1.2.3-13-gbd6f