summaryrefslogtreecommitdiff
path: root/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'context.h')
-rw-r--r--context.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/context.h b/context.h
index ebda7eb..0030535 100644
--- a/context.h
+++ b/context.h
@@ -234,6 +234,23 @@ public: \
members \
} __packed__
+// pso/packet_classes.h
+#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(); \
+ }; \
+}
+#endif
+
// pso/forward.h
// Class forward.
class TTcpSocket;
@@ -510,6 +527,39 @@ TMenuListEntry(QuestListEntry,
char short_description[112];
);
+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__)
+_TSendAction(1,
+ char name[16];
+);
+
+_TSendAction(2,
+ char password[16];
+);
+
+_TSendAction(3,
+ char name[16];
+ char password[16];
+);
+
+#undef _TSendAction
+#endif
+
// pso/TProtocol.h
// NOTE: This is only here because of the ordering of this.
// In Reality, the definition of `_packet` is above `flex_packet`.
@@ -1655,4 +1705,13 @@ 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();
};