summaryrefslogtreecommitdiff
path: root/src/map/packets_struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r--src/map/packets_struct.h217
1 files changed, 206 insertions, 11 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index e8207d29c..852a44cb8 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -279,10 +279,15 @@ enum packet_headers {
#else
unequipitemackType = 0xac,
#endif
-#if PACKETVER >= 20150226
+#if PACKETVER_MAIN_NUM >= 20180801 || PACKETVER_RE_NUM >= 20180801 || PACKETVER_ZERO_NUM >= 20180808
+ viewequipackType = 0xb03,
+#elif PACKETVER >= 20150226
viewequipackType = 0xa2d,
#elif PACKETVER >= 20120925
viewequipackType = 0x997,
+// [4144] not supported due other packets/structs not updated
+//#elif (PACKETVER_MAIN_NUM >= 20111207) || (PACKETVER_RE_NUM >= 20111122)
+// viewequipackType = 0x906,
#elif PACKETVER >= 20101124
viewequipackType = 0x859,
#else
@@ -302,6 +307,11 @@ enum packet_headers {
rouletteinfoackType = 0xa1c,
roulettgenerateackType = 0xa20,
roulettercvitemackType = 0xa22,
+#if PACKETVER >= 20141016
+ achievementListType = 0xa23,
+ achievementUpdateType = 0xa24,
+ achievementRewardAckType = 0xa26,
+#endif // PACKETVER >= 20141016
#if PACKETVER >= 20150513 // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
questListType = 0x9f8, ///< ZC_ALL_QUEST_LIST3
#elif PACKETVER >= 20141022
@@ -341,8 +351,7 @@ enum packet_headers {
#if PACKETVER >= 20171207
partymemberinfo = 0x0ae4,
partyinfo = 0x0ae5,
-#elif PACKETVER >= 20170502
-// [4144] probably 0xa43 packet can works on older clients because in client was added in 2015-10-07
+#elif PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
partymemberinfo = 0x0a43,
partyinfo = 0x0a44,
#else
@@ -401,6 +410,29 @@ enum packet_headers {
#else
hominfoType = 0x22e,
#endif
+ reqName = 0x95,
+#if PACKETVER >= 20150503 // Confirm this?
+ reqNameAllType = 0xA30,
+#else
+ reqNameAllType = 0x195,
+#endif
+#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
+ skilWarpPointType = 0xabe,
+#else
+ skilWarpPointType = 0x11c,
+#endif
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+ guildExpulsion = 0xa82,
+#elif PACKETVER >= 20100803
+ guildExpulsion = 0x839,
+#else
+ guildExpulsion = 0x15c,
+#endif
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+ guildLeave = 0xa83,
+#else
+ guildLeave = 0x15a,
+#endif
};
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
@@ -1206,6 +1238,9 @@ struct packet_viewequip_ack {
#endif
int16 headpalette;
int16 bodypalette;
+#if PACKETVER_MAIN_NUM >= 20180801 || PACKETVER_RE_NUM >= 20180801 || PACKETVER_ZERO_NUM >= 20180808
+ int16 body2;
+#endif
uint8 sex;
struct EQUIPITEM_INFO list[MAX_INVENTORY];
} __attribute__((packed));
@@ -1287,7 +1322,11 @@ struct packet_npc_market_purchase {
int16 PacketType;
int16 PacketLength;
struct {
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 ITID;
+#else
uint16 ITID;
+#endif
int32 qty;
} list[]; // Note: We assume this should be <= MAX_INVENTORY (since you can't hold more than MAX_INVENTORY items thus cant buy that many at once).
} __attribute__((packed));
@@ -1331,7 +1370,7 @@ struct packet_wis_end {
int16 PacketType;
int8 result;
#if PACKETVER >= 20131223
- uint32 unknown;/* maybe AID, not sure what for (works sending as 0) */
+ uint32 AID;
#endif
} __attribute__((packed));
@@ -1566,8 +1605,9 @@ struct PACKET_CZ_REQ_NEXT_MAIL_LIST {
struct PACKET_CZ_REQ_OPEN_MAIL {
int16 PacketType;
#if PACKETVER >= 20170419
- int64 Upper_MailID;
- int8 unknown[16];
+ int64 char_Upper_MailID;
+ int64 return_Upper_MailID;
+ int64 account_Upper_MailID;
#else
int8 opentype;
int64 Upper_MailID;
@@ -1663,8 +1703,7 @@ struct PACKET_ZC_ADD_MEMBER_TO_GROUP {
uint32 GID;
#endif
uint32 leader;
-// [4144] probably 0xa43 packet can works on older clients because in client was added in 2015-10-07
-#if PACKETVER >= 20170502
+#if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
int16 class;
int16 baseLevel;
#endif
@@ -1687,7 +1726,7 @@ struct PACKET_ZC_GROUP_LIST_SUB {
char mapName[MAP_NAME_LENGTH_EXT];
uint8 leader;
uint8 offline;
-#if PACKETVER >= 20170502
+#if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
int16 class;
int16 baseLevel;
#endif
@@ -1816,6 +1855,14 @@ struct PACKET_ZC_FORMATSTRING_MSG {
char MessageString[];
} __attribute__((packed));
+struct PACKET_ZC_FORMATSTRING_MSG_COLOR {
+ uint16 PacketType;
+ uint16 PacketLength;
+ uint16 messageId;
+ uint32 color;
+ char messageString[];
+} __attribute__((packed));
+
struct PACKET_ZC_MSG_COLOR {
uint16 PacketType;
uint16 MessageId;
@@ -1864,9 +1911,17 @@ struct PACKET_CZ_REQ_STYLE_CHANGE {
int16 TopAccessory;
int16 MidAccessory;
int16 BottomAccessory;
-#if PACKETVER_RE_NUM >= 20180718
+} __attribute__((packed));
+
+struct PACKET_CZ_REQ_STYLE_CHANGE2 {
+ int16 PacketType;
+ int16 HeadPalette;
+ int16 HeadStyle;
+ int16 BodyPalette;
+ int16 TopAccessory;
+ int16 MidAccessory;
+ int16 BottomAccessory;
int16 BodyStyle;
-#endif
} __attribute__((packed));
struct PACKET_ZC_STYLE_CHANGE_RES {
@@ -2589,6 +2644,146 @@ struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
} __attribute__((packed));
+/* Achievement System */
+struct ach_list_info {
+ uint32 ach_id;
+ uint8 completed;
+ uint32 objective[MAX_ACHIEVEMENT_OBJECTIVES];
+ uint32 completed_at;
+ uint8 reward;
+} __attribute__((packed));
+
+struct packet_achievement_list {
+ uint16 packet_id;
+ uint16 packet_len;
+ uint32 total_achievements;
+ uint32 total_points;
+ uint16 rank;
+ uint32 current_rank_points;
+ uint32 next_rank_points;
+ struct ach_list_info ach[MAX_ACHIEVEMENT_DB];
+} __attribute__((packed));
+
+struct packet_achievement_update {
+ uint16 packet_id;
+ uint32 total_points;
+ uint16 rank;
+ uint32 current_rank_points;
+ uint32 next_rank_points;
+ struct ach_list_info ach;
+} __attribute__((packed));
+
+struct packet_achievement_reward_ack {
+ uint16 packet_id;
+ uint8 received;
+ uint32 ach_id;
+} __attribute__((packed));
+
+// Name Packet ZC_ACK_REQNAME
+struct packet_reqname_ack {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
+} __attribute__((packed));
+
+// ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
+struct packet_reqnameall_ack {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
+ char party_name[NAME_LENGTH];
+ char guild_name[NAME_LENGTH];
+ char position_name[NAME_LENGTH];
+#if PACKETVER >= 20150503 // Confirm this?
+ int32 title_id; // Achievement Title
+#endif
+} __attribute__((packed));
+
+struct PACKET_ZC_OVERWEIGHT_PERCENT {
+ int16 packetType;
+ uint32 percent;
+} __attribute__((packed));
+
+struct PACKET_ZC_WARPLIST_sub {
+ char map[MAP_NAME_LENGTH_EXT];
+} __attribute__((packed));
+
+struct PACKET_ZC_WARPLIST {
+ int16 packetType;
+#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
+ int16 packetLength;
+ uint16 skillId;
+ struct PACKET_ZC_WARPLIST_sub maps[];
+#else
+ uint16 skillId;
+ struct PACKET_ZC_WARPLIST_sub maps[4];
+#endif
+} __attribute__((packed));
+
+struct PACKET_ZC_GROUP_ISALIVE {
+ int16 packetType;
+ uint32 AID;
+ uint8 isDead;
+} __attribute__((packed));
+
+struct PACKET_ZC_GUILD_POSITION {
+ int16 packetType;
+ int16 packetLength;
+ uint32 AID;
+ char position[];
+} __attribute__((packed));
+
+struct PACKET_ZC_INVENTORY_MOVE_FAILED {
+ int16 packetType;
+ int16 index;
+ int16 unknown;
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+#define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD3
+#elif PACKETVER >= 20100803
+#define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD2
+#else
+#define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD1
+#endif
+
+struct PACKET_ZC_ACK_BAN_GUILD1 {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ char reason[40];
+ char account_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct PACKET_ZC_ACK_BAN_GUILD2 {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ char reason[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_ACK_BAN_GUILD3 {
+ int16 packetType;
+ char reason[40];
+ uint32 GID;
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+#define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD2
+#else
+#define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD1
+#endif
+
+struct PACKET_ZC_ACK_LEAVE_GUILD1 {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ char reason[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_ACK_LEAVE_GUILD2 {
+ int16 packetType;
+ uint32 GID;
+ char reason[40];
+} __attribute__((packed));
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris