summaryrefslogtreecommitdiff
path: root/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'context.h')
-rw-r--r--context.h80
1 files changed, 69 insertions, 11 deletions
diff --git a/context.h b/context.h
index 8d4e3d0..dd9c539 100644
--- a/context.h
+++ b/context.h
@@ -188,7 +188,7 @@ typedef long ptrdiff_t;
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_18_90_9A_recv_pso_regist_check, u8 state) \
o(handle_92_9C_register_response_packet, void) \
o(unused10, void) \
o(handle_95_request_character_data_packet, void) \
@@ -898,6 +898,27 @@ struct send_buffs {
};
// pso/packet_classes.h
+#define _gc_tag_packet_templ(name, members) \
+template<bool has_gc_tag = false> \
+struct name { \
+ packet_header header; \
+ members \
+}; \
+ \
+template<> \
+struct name<true> { \
+ packet_header header; \
+ TPlyGuildCardTag tag; \
+ members \
+}
+
+_gc_tag_packet_templ(regist,
+ TPlySmth smth;
+ u32 sub_version;
+ u8 is_extended;
+ u8 language;
+);
+
struct game_command_header {
char command;
char size;
@@ -1467,6 +1488,45 @@ public:
};
};
+class TSendPsoRegist : public regist<false> {
+public:
+ char serial_number[48];
+ char access_key[48];
+ char password[48];
+public:
+ void bswap() {
+ header.bswap();
+ smth.bswap();
+ bswap_32(&sub_version);
+ };
+};
+
+class TSendPsoRegistConnect {
+public:
+ packet_header header;
+ char serial_number[17];
+ char access_key[17];
+ u16 padding;
+public:
+ void bswap() {
+ header.bswap();
+ };
+};
+
+class TRecvPsoRegistConnect {
+public:
+ packet_header header;
+ char copyright[64];
+ u32 server_key;
+ u32 client_key;
+public:
+ void bswap() {
+ header.bswap();
+ bswap_32(&server_key);
+ bswap_32(&client_key);
+ };
+};
+
template<bool is_lobby>
class TRecvExit {
public:
@@ -1480,14 +1540,8 @@ public:
};
};
-class TRegister {
+class TRegister : public regist<false> {
public:
- packet_header header;
- TPlySmth smth;
- u32 sub_version;
- u8 is_extended;
- u8 language;
- u16 unknown;
char serial_number[16];
char access_key[16];
public:
@@ -1792,7 +1846,7 @@ public:
TPlySmth m_smth;
TPlyGuildCardTag m_guildcard_tag;
u16 m_sub_version;
- int m_login_response_state;
+ int m_regist_state;
int m_connected;
int m_joined_game;
int m_has_meet_user_settings;
@@ -1811,8 +1865,8 @@ public:
LobbyListEntry m_lobby_entries[16];
QuestListEntry m_quest_entries[30];
u8 m_unused5[128];
- char m_serial_number3[17];
- char m_password2[17];
+ char m_serial_number_v1[17];
+ char m_access_key_v1[17];
char m_serial_number[48];
char m_access_key[48];
char m_password[64];
@@ -1917,6 +1971,10 @@ public:
void recv_burst_lobby(packet &pkt);
// 0x69
void recv_exit_lobby(packet &pkt);
+ // 0x91
+ void recv_pso_regist_connect(packet &pkt);
+ // 0x18/0x90
+ void recv_pso_regist_check(packet &pkt);
// Send command handlers.
// 0x03