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.h306
1 files changed, 278 insertions, 28 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 9ae99afda..af76a66d7 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -198,7 +198,9 @@ enum packet_headers {
#else
dropflooritemType = 0x9e,
#endif
-#if PACKETVER >= 20120925
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ inventorylistnormalType = 0xb09,
+#elif PACKETVER >= 20120925
inventorylistnormalType = 0x991,
#elif PACKETVER >= 20080102
inventorylistnormalType = 0x2e8,
@@ -207,7 +209,9 @@ enum packet_headers {
#else
inventorylistnormalType = 0xa3,
#endif
-#if PACKETVER >= 20150226
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ inventorylistequipType = 0xb0a,
+#elif PACKETVER >= 20150226
inventorylistequipType = 0xa0d,
#elif PACKETVER >= 20120925
inventorylistequipType = 0x992,
@@ -218,27 +222,33 @@ enum packet_headers {
#else
inventorylistequipType = 0xa4,
#endif
-#if PACKETVER >= 20120925
- storagelistnormalType = 0x995,
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+ storageListNormalType = 0xb09,
+#elif PACKETVER >= 20120925
+ storageListNormalType = 0x995,
#elif PACKETVER >= 20080102
- storagelistnormalType = 0x2ea,
+ storageListNormalType = 0x2ea,
#elif PACKETVER >= 20071002
- storagelistnormalType = 0x295,
+ storageListNormalType = 0x295,
#else
- storagelistnormalType = 0xa5,
+ storageListNormalType = 0xa5,
#endif
-#if PACKETVER >= 20150226
- storagelistequipType = 0xa10,
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+ storageListEquipType = 0xb0a,
+#elif PACKETVER >= 20150226
+ storageListEquipType = 0xa10,
#elif PACKETVER >= 20120925
- storagelistequipType = 0x996,
+ storageListEquipType = 0x996,
#elif PACKETVER >= 20080102
- storagelistequipType = 0x2d1,
+ storageListEquipType = 0x2d1,
#elif PACKETVER >= 20071002
- storagelistequipType = 0x296,
+ storageListEquipType = 0x296,
#else
- storagelistequipType = 0xa6,
+ storageListEquipType = 0xa6,
#endif
-#if PACKETVER >= 20120925
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+ cartlistnormalType = 0xb09,
+#elif PACKETVER >= 20120925
cartlistnormalType = 0x993,
#elif PACKETVER >= 20080102
cartlistnormalType = 0x2e9,
@@ -247,7 +257,9 @@ enum packet_headers {
#else
cartlistnormalType = 0x123,
#endif
-#if PACKETVER >= 20150226
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+ cartlistequipType = 0xb0a,
+#elif PACKETVER >= 20150226
cartlistequipType = 0xa0f,
#elif PACKETVER >= 20120925
cartlistequipType = 0x994,
@@ -279,10 +291,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 +319,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 +363,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 +422,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
@@ -1130,28 +1174,63 @@ struct packet_roulette_itemrecv_ack {
struct packet_itemlist_normal {
int16 PacketType;
int16 PacketLength;
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
struct NORMALITEM_INFO list[MAX_ITEMLIST];
} __attribute__((packed));
struct packet_itemlist_equip {
int16 PacketType;
int16 PacketLength;
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
struct EQUIPITEM_INFO list[MAX_ITEMLIST];
} __attribute__((packed));
-struct packet_storelist_normal {
+struct ZC_STORE_ITEMLIST_NORMAL {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER >= 20120925
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919
char name[NAME_LENGTH];
#endif
struct NORMALITEM_INFO list[MAX_ITEMLIST];
} __attribute__((packed));
-struct packet_storelist_equip {
+struct ZC_INVENTORY_START {
+ int16 packetType;
+#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919
+ int16 packetLength;
+#endif
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
+#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919
+ char name[];
+#else
+ char name[NAME_LENGTH];
+#endif
+} __attribute__((packed));
+
+struct ZC_INVENTORY_END {
+ int16 packetType;
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
+ char flag;
+} __attribute__((packed));
+
+struct ZC_STORE_ITEMLIST_EQUIP {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER >= 20120925
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+ uint8 invType;
+#endif
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919
char name[NAME_LENGTH];
#endif
struct EQUIPITEM_INFO list[MAX_ITEMLIST];
@@ -1206,6 +1285,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 +1369,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 +1417,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 +1652,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 +1750,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 +1773,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 +1902,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;
@@ -1866,6 +1960,17 @@ struct PACKET_CZ_REQ_STYLE_CHANGE {
int16 BottomAccessory;
} __attribute__((packed));
+struct PACKET_CZ_REQ_STYLE_CHANGE2 {
+ int16 PacketType;
+ int16 HeadPalette;
+ int16 HeadStyle;
+ int16 BodyPalette;
+ int16 TopAccessory;
+ int16 MidAccessory;
+ int16 BottomAccessory;
+ int16 BodyStyle;
+} __attribute__((packed));
+
struct PACKET_ZC_STYLE_CHANGE_RES {
int16 PacketType;
int8 flag;
@@ -2586,6 +2691,151 @@ 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));
+
+struct PACKET_CZ_MEMORIALDUNGEON_COMMAND {
+ int16 packetType;
+ int32 command;
+} __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