summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/pso/TProtocol.h9
-rw-r--r--include/pso/packet_classes.h47
2 files changed, 56 insertions, 0 deletions
diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h
index 31e6eab..b970998 100644
--- a/include/pso/TProtocol.h
+++ b/include/pso/TProtocol.h
@@ -255,6 +255,15 @@ public:
void send_logout();
// 0x06
void send_chat(TPlyGuildCardTag &tag, char *mesg);
+ // 0x10
+ void send_action(GameListEntry &selection, char *action_name, char *password);
+ void send_action(GameListEntry &selection, u8 flags, char *action_name, char *password);
+ // 0x09
+ void send_info(TPlyGuildCardTag &tag);
+ // 0x08
+ void send_game_list();
+ // 0x1F
+ void send_text_list();
};
#endif
diff --git a/include/pso/packet_classes.h b/include/pso/packet_classes.h
index 98f45bc..268ac40 100644
--- a/include/pso/packet_classes.h
+++ b/include/pso/packet_classes.h
@@ -83,6 +83,53 @@ union game_command_union {
u8 bytes[1024];
};
+template<int action_type = 0>
+class TSendAction {
+public:
+ packet_header header;
+ TPlyGuildCardTag tag;
+ #if defined(__GNUC__) || defined(__clang__)
+ char name[(action_type & 1) ? 16 : 0];
+ char password[(action_type & 2) ? 16 : 0];
+ #endif
+public:
+ void bswap() {
+ header.bswap();
+ tag.bswap();
+ };
+};
+
+#if !defined(__GNUC__) && !defined(__clang__)
+#define _TSendAction(action_type, members) \
+template<> \
+class TSendAction<action_type> { \
+public: \
+ packet_header header; \
+ TPlyGuildCardTag tag; \
+ members \
+public: \
+ void bswap() { \
+ header.bswap(); \
+ tag.bswap(); \
+ }; \
+}
+
+_TSendAction(1,
+ char name[16];
+);
+
+_TSendAction(2,
+ char password[16];
+);
+
+_TSendAction(3,
+ char name[16];
+ char password[16];
+);
+
+#undef _TSendAction
+#endif
+
class TRegister {
public:
packet_header header;