From b80218a8c1fafb174e3f05c0b51c61005531bf05 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 8 Mar 2023 16:48:05 -0400 Subject: TProtocol: Start work on `handle_command()`, and the command handlers Hopefully, we can make some good progress. Also, oof, I didn't realize that what I thought were `operator=()`, or a manual `assign()` function, was actually a copy ctor. --- context.h | 122 ++++++++++++++++++++++++++++++++---- include/pso/PSOV3Encryption.h | 1 - include/pso/PSOV3EncryptionTCP.h | 1 - include/pso/TMath.h | 1 - include/pso/TMenuList.h | 1 - include/pso/TPlyCharData.h | 1 - include/pso/TPlyClientConfig.h | 1 - include/pso/TPlyDispData.h | 1 - include/pso/TPlyGuildCardTag.h | 6 ++ include/pso/TPlyInventory.h | 1 - include/pso/TProtocol.h | 107 ++++++++++++++++++++++++++++---- include/pso/TSocket.h | 1 - include/pso/TTcpSocket.h | 1 - include/pso/packet_classes.h | 27 ++++++++ src/pso/PSOV3Encryption.cpp | 1 - src/pso/PSOV3EncryptionTCP.cpp | 1 - src/pso/TProtocol.cpp | 129 +++++++++++++++++++++++++-------------- src/pso/TSocket.cpp | 1 - src/pso/TTcpSocket.cpp | 1 - 19 files changed, 321 insertions(+), 84 deletions(-) create mode 100644 include/pso/packet_classes.h diff --git a/context.h b/context.h index def67af..c650a13 100644 --- a/context.h +++ b/context.h @@ -165,6 +165,63 @@ typedef long ptrdiff_t; #define DISALLOW_OR_ALLOW_CHILD(flags, old_flags, flag_name) \ X_OR_Y_CHILD(flags, old_flags, allow, disallow, flag_name) +// pso/TProtocol.h +#define RECV_PACKET_HANDLERS \ + o(handle_unused_login, void) \ + o(handle_03_recv_regist, void) \ + o(handle_04_recv_login, void) \ + o(handle_05_recv_logout, void) \ + o(handle_07_A0_A1_recv_dir_list, int entry_count, TMenuListEntry *entries, TMenuListEntry &entry_0) \ + o(handle_08_recv_game_list, int entry_count, TMenuListEntry *entries, TMenuListEntry &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(unused7, void) \ + o(handle_64_join_game_packet, void) \ + o(unused8, void) \ + o(handle_67_join_lobby_packet, void) \ + o(handle_80_unused_ignored_packet, void) \ + 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_18_90_9A_login_response_packet, void) \ + o(handle_92_9C_register_response_packet, void) \ + o(unused10, void) \ + o(handle_95_request_character_data_packet, void) \ + o(handle_81_simple_mail_packet, void) \ + o(handle_41_guild_card_search_reply_packet, void) \ + o(send_96_unused, void) \ + o(handle_97_checksum_reply_packet, void) \ + o(handle_B1_current_time_packet, void) \ + o(handle_C0_choice_search_option_packet, void) \ + o(handle_C4_choice_search_reply_packet, void) \ + o(handle_D8_infoboard_packet, void) \ + o(handle_A2_quest_list_packet, void) \ + o(handle_A3_quest_info_packet, void) \ + o(handle_44_quest_file_list_packet, void) \ + o(handle_13_quest_data_packet, void) \ + o(handle_A4_downloadable_quest_menu_packet, void) \ + o(handle_A5_downloadable_quest_info_packet, void) \ + 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_B0_server_message_packet, void) \ + o(handle_88_player_arrow_color_list_packet, void) \ + o(handle_8A_lobby_name_packet, void) \ + o(handle_C5_player_challenge_data_packet, void) \ + o(handle_DA_lobby_event_packet, void) \ + o(handle_AB_quest_stats_response_packet, void) \ + o(handle_D3_execute_trade_packet, void) \ + o(handle_D4_trade_result_packet, void) \ + o(handle_D1_advance_trade_state_packet, void) + +#define recv_packet_handler(name) recv_packet_handler_##name + // pso/forward.h // Class forward. class TTcpSocket; @@ -180,7 +237,10 @@ struct packet_header; // pso/TProtocol.h // User typedefs. -typedef void (*recv_packet_handler)(packet &pkt); +#define o(name, ...) typedef void (*recv_packet_handler(name))(__VA_ARGS__); +RECV_PACKET_HANDLERS; +#undef o +typedef void (TProtocol::*command_handler)(packet &pkt); // pso/TArray.h // Template defs. @@ -650,16 +710,6 @@ struct packet { } pkt; u8 bytes[0x7c00]; }; - - template - T &as() { - return reinterpret_cast(*this); - }; - - template - T *as_ptr() { - return reinterpret_cast(this); - }; }; struct GameListEntry { @@ -679,6 +729,17 @@ struct QuestListEntry { char short_description[112]; }; +struct recv_packet_handlers { + #define o(name, ...) recv_packet_handler(name) name; + RECV_PACKET_HANDLERS; + #undef o +}; + +struct command_handler_entry { + int command; + command_handler handler; +}; + // pso/TSocket.h // Union defs. union ipv4_addr { @@ -777,6 +838,12 @@ public: class TPlyGuildCardTag { public: TPlyGuildCardTag() {}; + TPlyGuildCardTag(TPlyGuildCardTag &src) { + m_tag.tag0 = src.m_tag.tag0; + m_tag.tag1 = src.m_tag.tag1; + m_tag.tag2 = src.m_tag.tag2; + m_guildcard_number = src.m_guildcard_number; + }; TPlyGuildCardTag(u16 tag2, u32 guildcard_number) { m_tag.tag0 = 0; m_tag.tag1 = 0; @@ -1104,6 +1171,19 @@ public: u32 *m_buffer_end; }; +// pso/packet_classes.h +class TMessageBox { +public: + packet_header header; + TPlyGuildCardTag tag; + char mesg[512]; +public: + void bswap() { + header.bswap(); + tag.bswap(); + }; +}; + // pso/TProtocol.h class TProtocol : public TTcpSocket { public: @@ -1141,7 +1221,7 @@ public: int m_packet_offset; int m_packet_size; struct packet m_packet; - recv_packet_handler m_recv_handlers[52]; + struct recv_packet_handlers m_recv_handlers; public: TProtocol(TObject *parent, u16 sub_version, int language, char *serial_number, char *access_key, char *password); virtual ~TProtocol(); @@ -1152,4 +1232,22 @@ public: void some_stub() {}; int handle_command(struct packet *pkt); void parse_packet(); + + // Command handlers. + // 0x01 + void recv_error(packet &pkt); + // 0x03 + void recv_regist(packet &pkt); + // 0x04 + void recv_login(packet &pkt); + // 0x05 + void recv_logout(packet &pkt); + // 0x06 + void recv_chat(packet &pkt); + // 0x07 + void recv_dir_list(packet &pkt); + // 0x08 + void recv_game_list(packet &pkt); + // 0x0E + void recv_start_game(packet &pkt); }; diff --git a/include/pso/PSOV3Encryption.h b/include/pso/PSOV3Encryption.h index d34cd4f..f0066f4 100644 --- a/include/pso/PSOV3Encryption.h +++ b/include/pso/PSOV3Encryption.h @@ -4,7 +4,6 @@ #include #include #include -#include class PSOEncryption { public: diff --git a/include/pso/PSOV3EncryptionTCP.h b/include/pso/PSOV3EncryptionTCP.h index 9546df0..be4efbb 100644 --- a/include/pso/PSOV3EncryptionTCP.h +++ b/include/pso/PSOV3EncryptionTCP.h @@ -6,7 +6,6 @@ #include #include #include -#include class PSOV3EncryptionTCP : public PSOV3Encryption { public: diff --git a/include/pso/TMath.h b/include/pso/TMath.h index 799c498..e279a2c 100644 --- a/include/pso/TMath.h +++ b/include/pso/TMath.h @@ -4,7 +4,6 @@ #include #include #include -#include struct vec2f { float x; diff --git a/include/pso/TMenuList.h b/include/pso/TMenuList.h index d065622..3a38a66 100644 --- a/include/pso/TMenuList.h +++ b/include/pso/TMenuList.h @@ -4,7 +4,6 @@ #include "pso/forward.h" #include "pso/protocol.h" #include "pso/macros.h" -#include "pso/TArray.h" #include "pso/TPlyGuildCardTag.h" #include diff --git a/include/pso/TPlyCharData.h b/include/pso/TPlyCharData.h index 7e0036c..5a7dd48 100644 --- a/include/pso/TPlyCharData.h +++ b/include/pso/TPlyCharData.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/include/pso/TPlyClientConfig.h b/include/pso/TPlyClientConfig.h index b4c9103..8876640 100644 --- a/include/pso/TPlyClientConfig.h +++ b/include/pso/TPlyClientConfig.h @@ -4,7 +4,6 @@ #include #include #include -#include class TPlyClientConfig { public: diff --git a/include/pso/TPlyDispData.h b/include/pso/TPlyDispData.h index 2113d04..679e329 100644 --- a/include/pso/TPlyDispData.h +++ b/include/pso/TPlyDispData.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/include/pso/TPlyGuildCardTag.h b/include/pso/TPlyGuildCardTag.h index de96902..948426a 100644 --- a/include/pso/TPlyGuildCardTag.h +++ b/include/pso/TPlyGuildCardTag.h @@ -14,6 +14,12 @@ struct gc_tag { class TPlyGuildCardTag { public: TPlyGuildCardTag() {}; + TPlyGuildCardTag(TPlyGuildCardTag &src) { + m_tag.tag0 = src.m_tag.tag0; + m_tag.tag1 = src.m_tag.tag1; + m_tag.tag2 = src.m_tag.tag2; + m_guildcard_number = src.m_guildcard_number; + }; TPlyGuildCardTag(u16 tag2, u32 guildcard_number) { m_tag.tag0 = 0; m_tag.tag1 = 0; diff --git a/include/pso/TPlyInventory.h b/include/pso/TPlyInventory.h index 397b4cc..3256717 100644 --- a/include/pso/TPlyInventory.h +++ b/include/pso/TPlyInventory.h @@ -4,7 +4,6 @@ #include #include #include -#include struct TItemData { void init(); diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h index f9d22f9..9d24830 100644 --- a/include/pso/TProtocol.h +++ b/include/pso/TProtocol.h @@ -5,9 +5,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -29,16 +29,6 @@ struct packet { } pkt; u8 bytes[0x7c00]; }; - - template - T &as() { - return reinterpret_cast(*this); - }; - - template - T *as_ptr() { - return reinterpret_cast(this); - }; }; struct GameListEntry { @@ -58,7 +48,80 @@ struct QuestListEntry { char short_description[112]; }; -typedef void (*recv_packet_handler)(packet &pkt); + +#define RECV_PACKET_HANDLERS \ + o(handle_unused_login, void) \ + o(handle_03_recv_regist, void) \ + o(handle_04_recv_login, void) \ + o(handle_05_recv_logout, void) \ + o(handle_07_A0_A1_recv_dir_list, int entry_count, TMenuListEntry *entries, TMenuListEntry &entry_0) \ + o(handle_08_recv_game_list, int entry_count, TMenuListEntry *entries, TMenuListEntry &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(unused7, void) \ + o(handle_64_join_game_packet, void) \ + o(unused8, void) \ + o(handle_67_join_lobby_packet, void) \ + o(handle_80_unused_ignored_packet, void) \ + 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_18_90_9A_login_response_packet, void) \ + o(handle_92_9C_register_response_packet, void) \ + o(unused10, void) \ + o(handle_95_request_character_data_packet, void) \ + o(handle_81_simple_mail_packet, void) \ + o(handle_41_guild_card_search_reply_packet, void) \ + o(send_96_unused, void) \ + o(handle_97_checksum_reply_packet, void) \ + o(handle_B1_current_time_packet, void) \ + o(handle_C0_choice_search_option_packet, void) \ + o(handle_C4_choice_search_reply_packet, void) \ + o(handle_D8_infoboard_packet, void) \ + o(handle_A2_quest_list_packet, void) \ + o(handle_A3_quest_info_packet, void) \ + o(handle_44_quest_file_list_packet, void) \ + o(handle_13_quest_data_packet, void) \ + o(handle_A4_downloadable_quest_menu_packet, void) \ + o(handle_A5_downloadable_quest_info_packet, void) \ + 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_B0_server_message_packet, void) \ + o(handle_88_player_arrow_color_list_packet, void) \ + o(handle_8A_lobby_name_packet, void) \ + o(handle_C5_player_challenge_data_packet, void) \ + o(handle_DA_lobby_event_packet, void) \ + o(handle_AB_quest_stats_response_packet, void) \ + o(handle_D3_execute_trade_packet, void) \ + o(handle_D4_trade_result_packet, void) \ + o(handle_D1_advance_trade_state_packet, void) + +#define recv_packet_handler(name) recv_packet_handler_##name + +#define o(name, ...) typedef void (*recv_packet_handler(name))(__VA_ARGS__); +RECV_PACKET_HANDLERS; +#undef o + +struct recv_packet_handlers { + #define o(name, ...) recv_packet_handler(name) name; + RECV_PACKET_HANDLERS; + #undef o +}; + +typedef void (TProtocol::*command_handler)(packet &pkt); + +struct command_handler_entry { + int command; + command_handler handler; +}; + class TProtocol : public TTcpSocket { public: @@ -96,7 +159,7 @@ public: int m_packet_offset; int m_packet_size; struct packet m_packet; - recv_packet_handler m_recv_handlers[52]; + struct recv_packet_handlers m_recv_handlers; public: TProtocol(TObject *parent, u16 sub_version, int language, char *serial_number, char *access_key, char *password); virtual ~TProtocol(); @@ -107,6 +170,24 @@ public: void some_stub() {}; int handle_command(struct packet *pkt); void parse_packet(); + + // Command handlers. + // 0x01 + void recv_error(packet &pkt); + // 0x03 + void recv_regist(packet &pkt); + // 0x04 + void recv_login(packet &pkt); + // 0x05 + void recv_logout(packet &pkt); + // 0x06 + void recv_chat(packet &pkt); + // 0x07 + void recv_dir_list(packet &pkt); + // 0x08 + void recv_game_list(packet &pkt); + // 0x0E + void recv_start_game(packet &pkt); }; #endif diff --git a/include/pso/TSocket.h b/include/pso/TSocket.h index 4a1f5ab..66df9dc 100644 --- a/include/pso/TSocket.h +++ b/include/pso/TSocket.h @@ -5,7 +5,6 @@ #include #include #include -#include #include union ipv4_addr { diff --git a/include/pso/TTcpSocket.h b/include/pso/TTcpSocket.h index aa0790a..1be39a4 100644 --- a/include/pso/TTcpSocket.h +++ b/include/pso/TTcpSocket.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/include/pso/packet_classes.h b/include/pso/packet_classes.h new file mode 100644 index 0000000..87e0b06 --- /dev/null +++ b/include/pso/packet_classes.h @@ -0,0 +1,27 @@ +#ifndef PACKET_CLASSES_H +#define PACKET_CLASSES_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TMessageBox { +public: + packet_header header; + TPlyGuildCardTag tag; + char mesg[512]; +public: + void bswap() { + header.bswap(); + tag.bswap(); + }; +}; + +#endif diff --git a/src/pso/PSOV3Encryption.cpp b/src/pso/PSOV3Encryption.cpp index 867c864..40d80e1 100644 --- a/src/pso/PSOV3Encryption.cpp +++ b/src/pso/PSOV3Encryption.cpp @@ -2,7 +2,6 @@ #include #include "pso/macros.h" #include "pso/PSOV3Encryption.h" -#include "pso/TArray.h" u32 PSOV3Encryption::next() { if (++m_buffer_start == m_buffer_end) { diff --git a/src/pso/PSOV3EncryptionTCP.cpp b/src/pso/PSOV3EncryptionTCP.cpp index 737c510..d688b8d 100644 --- a/src/pso/PSOV3EncryptionTCP.cpp +++ b/src/pso/PSOV3EncryptionTCP.cpp @@ -2,7 +2,6 @@ #include #include "pso/macros.h" #include "pso/PSOV3EncryptionTCP.h" -#include "pso/TArray.h" void PSOV3EncryptionTCP::encrypt(void *void_data, int size) { u32 *data = reinterpret_cast(void_data); diff --git a/src/pso/TProtocol.cpp b/src/pso/TProtocol.cpp index dacb966..644fe55 100644 --- a/src/pso/TProtocol.cpp +++ b/src/pso/TProtocol.cpp @@ -2,7 +2,6 @@ #include #include "pso/forward.h" #include "pso/macros.h" -#include "pso/TArray.h" #include "pso/TMainTask.h" #include "pso/TMenuList.h" #include "pso/TPlyCharData.h" @@ -20,8 +19,48 @@ void copy_packet(struct packet *pkt) { } -int TProtocol::handle_command(struct packet *pkt) { +void TProtocol::recv_regist(packet &pkt) {}; + +void TProtocol::recv_login(packet &pkt) {}; + +void TProtocol::recv_logout(packet &pkt) {}; + +void TProtocol::recv_chat(packet &pkt) {}; + +void TProtocol::recv_dir_list(packet &pkt) {}; + +void TProtocol::recv_game_list(packet &pkt) {}; +void TProtocol::recv_start_game(packet &pkt) {}; + +void TProtocol::recv_error(packet &pkt) { + TMessageBox tmp = as(TMessageBox &, pkt); + tmp.bswap(); + if (m_recv_handlers.handle_01_recv_error != nullptr) { + m_recv_handlers.handle_01_recv_error(tmp.mesg); + } +}; + +int TProtocol::handle_command(struct packet *pkt) { + static const command_handler_entry handlers[] = { + { 0x01, &recv_error }, + { 0x03, &recv_regist }, + { 0x04, &recv_login }, + { 0x05, &recv_logout }, + { 0x06, &recv_chat }, + { 0x07, &recv_dir_list }, + { 0x08, &recv_game_list }, + { 0x0E, &recv_start_game }, + { 0, nullptr } + }; + for (int i = 0; !handlers[i].command; ++i) { + if (pkt->pkt.header.command == handlers[i].command) { + (this->*handlers[i].handler)(*pkt); + return 0; + } + } + m_is_invalid_packet = true; + return 1; } void TProtocol::parse_packet() { @@ -142,49 +181,49 @@ TProtocol::TProtocol(TObject *parent, u16 sub_version, int language, char *seria fill_with(client_config, 0); - m_recv_handlers[0] = nullptr; - m_recv_handlers[1] = nullptr; - m_recv_handlers[2] = nullptr; - m_recv_handlers[3] = nullptr; - m_recv_handlers[4] = nullptr; - m_recv_handlers[6] = nullptr; - m_recv_handlers[7] = nullptr; - m_recv_handlers[8] = nullptr; - m_recv_handlers[10] = nullptr; - m_recv_handlers[11] = nullptr; - m_recv_handlers[12] = nullptr; - m_recv_handlers[13] = nullptr; - m_recv_handlers[14] = nullptr; - m_recv_handlers[36] = nullptr; - m_recv_handlers[15] = nullptr; - m_recv_handlers[16] = nullptr; - m_recv_handlers[17] = nullptr; - m_recv_handlers[18] = nullptr; - m_recv_handlers[19] = nullptr; - m_recv_handlers[20] = nullptr; - m_recv_handlers[22] = nullptr; - m_recv_handlers[23] = nullptr; - m_recv_handlers[25] = nullptr; - m_recv_handlers[26] = nullptr; - m_recv_handlers[33] = nullptr; - m_recv_handlers[34] = nullptr; - m_recv_handlers[35] = nullptr; - m_recv_handlers[36] = nullptr; - m_recv_handlers[37] = nullptr; - m_recv_handlers[38] = nullptr; - m_recv_handlers[41] = nullptr; - m_recv_handlers[28] = nullptr; - m_recv_handlers[43] = nullptr; - m_recv_handlers[42] = nullptr; - m_recv_handlers[44] = nullptr; - m_recv_handlers[45] = nullptr; - m_recv_handlers[46] = nullptr; - m_recv_handlers[49] = nullptr; - m_recv_handlers[50] = nullptr; - m_recv_handlers[51] = nullptr; - m_recv_handlers[32] = nullptr; - m_recv_handlers[47] = nullptr; - m_recv_handlers[48] = nullptr; + m_recv_handlers.handle_unused_login = nullptr; + m_recv_handlers.handle_03_recv_regist = nullptr; + m_recv_handlers.handle_04_recv_login = nullptr; + m_recv_handlers.handle_05_recv_logout = nullptr; + m_recv_handlers.handle_07_A0_A1_recv_dir_list = nullptr; + m_recv_handlers.handle_01_recv_error = nullptr; + m_recv_handlers.handle_06_recv_chat = nullptr; + m_recv_handlers.handle_11_additional_info_reply_packet = nullptr; + m_recv_handlers.handle_0E_recv_start_game = nullptr; + m_recv_handlers.unused7 = nullptr; + m_recv_handlers.handle_64_join_game_packet = nullptr; + m_recv_handlers.unused8 = nullptr; + m_recv_handlers.handle_67_join_lobby_packet = nullptr; + m_recv_handlers.handle_13_quest_data_packet = nullptr; + m_recv_handlers.handle_80_unused_ignored_packet = nullptr; + m_recv_handlers.unused9 = nullptr; + m_recv_handlers.handle_65_add_player_to_game_packet = nullptr; + m_recv_handlers.handle_66_player_left_game_packet = nullptr; + m_recv_handlers.handle_68_add_player_to_lobby_packet = nullptr; + m_recv_handlers.handle_69_player_left_lobby_packet = nullptr; + m_recv_handlers.handle_92_9C_register_response_packet = nullptr; + m_recv_handlers.unused10 = nullptr; + m_recv_handlers.handle_81_simple_mail_packet = nullptr; + m_recv_handlers.handle_41_guild_card_search_reply_packet = nullptr; + m_recv_handlers.handle_A2_quest_list_packet = nullptr; + m_recv_handlers.handle_A3_quest_info_packet = nullptr; + m_recv_handlers.handle_44_quest_file_list_packet = nullptr; + m_recv_handlers.handle_13_quest_data_packet = nullptr; + m_recv_handlers.handle_A4_downloadable_quest_menu_packet = nullptr; + m_recv_handlers.handle_A5_downloadable_quest_info_packet = nullptr; + m_recv_handlers.unused11 = nullptr; + m_recv_handlers.handle_97_checksum_reply_packet = nullptr; + m_recv_handlers.handle_B0_server_message_packet = nullptr; + m_recv_handlers.handle_1F_lobby_info_desk_list_packet = nullptr; + m_recv_handlers.handle_88_player_arrow_color_list_packet = nullptr; + m_recv_handlers.handle_8A_lobby_name_packet = nullptr; + m_recv_handlers.handle_C5_player_challenge_data_packet = nullptr; + m_recv_handlers.handle_D3_execute_trade_packet = nullptr; + m_recv_handlers.handle_D4_trade_result_packet = nullptr; + m_recv_handlers.handle_D1_advance_trade_state_packet = nullptr; + m_recv_handlers.handle_D8_infoboard_packet = nullptr; + m_recv_handlers.handle_DA_lobby_event_packet = nullptr; + m_recv_handlers.handle_AB_quest_stats_response_packet = nullptr; } #undef fill_with diff --git a/src/pso/TSocket.cpp b/src/pso/TSocket.cpp index d7d22a0..1c41181 100644 --- a/src/pso/TSocket.cpp +++ b/src/pso/TSocket.cpp @@ -1,7 +1,6 @@ #include #include #include "pso/macros.h" -#include "pso/TArray.h" #include "pso/TObject.h" #include "pso/TSocket.h" diff --git a/src/pso/TTcpSocket.cpp b/src/pso/TTcpSocket.cpp index 55bf360..2288bf1 100644 --- a/src/pso/TTcpSocket.cpp +++ b/src/pso/TTcpSocket.cpp @@ -2,7 +2,6 @@ #include #include #include "pso/macros.h" -#include "pso/TArray.h" #include "pso/TMainTask.h" #include "pso/TObject.h" #include "pso/TSocket.h" -- cgit v1.2.3-13-gbd6f