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.h793
1 files changed, 673 insertions, 120 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index af76a66d7..33b7759ce 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -25,10 +25,9 @@
#include "common/cbasetypes.h"
#include "common/mmo.h"
+#include "common/packetsstatic_len.h"
// Packet DB
-#define MIN_PACKET_DB 0x0064
-#define MAX_PACKET_DB 0x0F00
#define MAX_PACKET_POS 20
/**
@@ -198,7 +197,7 @@ enum packet_headers {
#else
dropflooritemType = 0x9e,
#endif
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
inventorylistnormalType = 0xb09,
#elif PACKETVER >= 20120925
inventorylistnormalType = 0x991,
@@ -209,7 +208,7 @@ enum packet_headers {
#else
inventorylistnormalType = 0xa3,
#endif
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
inventorylistequipType = 0xb0a,
#elif PACKETVER >= 20150226
inventorylistequipType = 0xa0d,
@@ -222,7 +221,7 @@ enum packet_headers {
#else
inventorylistequipType = 0xa4,
#endif
-#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
storageListNormalType = 0xb09,
#elif PACKETVER >= 20120925
storageListNormalType = 0x995,
@@ -233,7 +232,7 @@ enum packet_headers {
#else
storageListNormalType = 0xa5,
#endif
-#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
storageListEquipType = 0xb0a,
#elif PACKETVER >= 20150226
storageListEquipType = 0xa10,
@@ -246,7 +245,7 @@ enum packet_headers {
#else
storageListEquipType = 0xa6,
#endif
-#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
cartlistnormalType = 0xb09,
#elif PACKETVER >= 20120925
cartlistnormalType = 0x993,
@@ -257,7 +256,7 @@ enum packet_headers {
#else
cartlistnormalType = 0x123,
#endif
-#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
cartlistequipType = 0xb0a,
#elif PACKETVER >= 20150226
cartlistequipType = 0xa0f,
@@ -309,7 +308,6 @@ enum packet_headers {
monsterhpType = 0x977,
maptypeproperty2Type = 0x99b,
npcmarketresultackType = 0x9d7,
- npcmarketopenType = 0x9d5,
#if PACKETVER >= 20131223 // version probably can be 20131030 [4144]
wisendType = 0x9df,
#else
@@ -324,7 +322,9 @@ enum packet_headers {
achievementUpdateType = 0xa24,
achievementRewardAckType = 0xa26,
#endif // PACKETVER >= 20141016
-#if PACKETVER >= 20150513 // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ questListType = 0xaff, ///< ZC_ALL_QUEST_LIST4
+#elif PACKETVER >= 20150513 // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
questListType = 0x9f8, ///< ZC_ALL_QUEST_LIST3
#elif PACKETVER >= 20141022
questListType = 0x97a, ///< ZC_ALL_QUEST_LIST2
@@ -370,20 +370,21 @@ enum packet_headers {
partymemberinfo = 0x01e9,
partyinfo = 0x00fb,
#endif
-#if PACKETVER >= 20120702
- clanBasicInfo = 0x098A, ///< ZC_CLANINFO
-#endif
#if PACKETVER >= 20120716
clanOnlineCount = 0x0988, ///< ZC_NOTIFY_CLAN_CONNECTINFO
clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
clanMessage = 0x098E, ///< ZC_NOTIFY_CLAN_CHAT
#endif
-#if PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ questAddType = 0xb0c,
+#elif PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
questAddType = 0x9f9,
#else
questAddType = 0x2b3,
#endif // PACKETVER < 20150513
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ questUpdateType = 0xafe,
+#elif PACKETVER >= 20150513
questUpdateType = 0x9fa,
#else
questUpdateType = 0x2b5,
@@ -416,18 +417,7 @@ enum packet_headers {
#else
buyingStoreUpdateItemType = 0x81b,
#endif
-// probably can works also for < 20141223, but in 3CeaM packet size defined only for 20150513
-#if PACKETVER >= 20150513
- hominfoType = 0x9f7,
-#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
@@ -455,7 +445,7 @@ enum packet_headers {
* structs for data
*/
struct EQUIPSLOTINFO {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 card[4];
#else
uint16 card[4];
@@ -464,7 +454,7 @@ struct EQUIPSLOTINFO {
struct NORMALITEM_INFO {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -502,7 +492,7 @@ struct ItemOptions {
struct EQUIPITEM_INFO {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -579,7 +569,7 @@ struct packet_additem {
int16 PacketType;
uint16 Index;
uint16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 nameid;
#else
uint16 nameid;
@@ -613,7 +603,7 @@ struct packet_additem {
struct packet_dropflooritem {
int16 PacketType;
uint32 ITAID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -725,7 +715,7 @@ struct packet_spawn_unit {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -798,7 +788,7 @@ struct packet_unit_walking {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -870,7 +860,7 @@ struct packet_idle_unit {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -1033,7 +1023,7 @@ struct packet_package_item_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -1041,7 +1031,7 @@ struct packet_package_item_announce {
int8 len;
char Name[NAME_LENGTH];
int8 unknown; // probably unused
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 BoxItemID;
#else
uint16 BoxItemID;
@@ -1053,7 +1043,7 @@ struct packet_item_drop_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -1108,7 +1098,7 @@ struct packet_roulette_open_ack {
int32 Serial;
int8 Step;
int8 Idx;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1146,7 +1136,7 @@ struct packet_roulette_generate_ack {
uint8 Result;
uint16 Step;
uint16 Idx;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1164,7 +1154,7 @@ struct packet_roulette_itemrecv_req {
struct packet_roulette_itemrecv_ack {
int16 PacketType;
uint8 Result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1174,7 +1164,7 @@ struct packet_roulette_itemrecv_ack {
struct packet_itemlist_normal {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
struct NORMALITEM_INFO list[MAX_ITEMLIST];
@@ -1183,7 +1173,7 @@ struct packet_itemlist_normal {
struct packet_itemlist_equip {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
struct EQUIPITEM_INFO list[MAX_ITEMLIST];
@@ -1192,10 +1182,10 @@ struct packet_itemlist_equip {
struct ZC_STORE_ITEMLIST_NORMAL {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
-#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
char name[NAME_LENGTH];
#endif
struct NORMALITEM_INFO list[MAX_ITEMLIST];
@@ -1203,13 +1193,13 @@ struct ZC_STORE_ITEMLIST_NORMAL {
struct ZC_INVENTORY_START {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
int16 packetLength;
#endif
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
-#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
char name[];
#else
char name[NAME_LENGTH];
@@ -1218,7 +1208,7 @@ struct ZC_INVENTORY_START {
struct ZC_INVENTORY_END {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
char flag;
@@ -1227,10 +1217,10 @@ struct ZC_INVENTORY_END {
struct ZC_STORE_ITEMLIST_EQUIP {
int16 PacketType;
int16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
uint8 invType;
#endif
-#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
char name[NAME_LENGTH];
#endif
struct EQUIPITEM_INFO list[MAX_ITEMLIST];
@@ -1289,6 +1279,7 @@ struct packet_viewequip_ack {
int16 body2;
#endif
uint8 sex;
+ // [4144] need remove MAX_INVENTORY from here
struct EQUIPITEM_INFO list[MAX_INVENTORY];
} __attribute__((packed));
@@ -1369,7 +1360,7 @@ struct packet_npc_market_purchase {
int16 PacketType;
int16 PacketLength;
struct {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -1383,36 +1374,40 @@ struct packet_npc_market_result_ack {
int16 PacketLength;
uint8 result;
struct {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
#endif
uint16 qty;
uint32 price;
+ // [4144] need remove MAX_INVENTORY from here
} list[MAX_INVENTORY];/* assuming MAX_INVENTORY is max since you can't hold more than MAX_INVENTORY items thus cant buy that many at once. */
} __attribute__((packed));
-struct packet_npc_market_open {
- int16 PacketType;
- int16 PacketLength;
- /* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
- struct {
-#if PACKETVER_RE_NUM >= 20180704
- uint32 nameid;
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
+/* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
+struct PACKET_ZC_NPC_MARKET_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
#else
- uint16 nameid;
+ uint16 nameid;
#endif
- uint8 type;
- uint32 price;
- uint32 qty;
- uint16 view;
- // It seems that the client doesn't have any hard-coded limit for this list
- // it's possible to send up to 1890 items without dropping a packet that's
- // too large [Panikon]
- } list[1000];/* TODO: whats the actual max of this? */
+ uint8 type;
+ uint32 price;
+ uint32 qty;
+ uint16 weight;
+} __attribute__((packed));
+
+struct PACKET_ZC_NPC_MARKET_OPEN {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x09d5);
+#endif
+
struct packet_wis_end {
int16 PacketType;
int8 result;
@@ -1449,7 +1444,11 @@ struct packet_hotkey {
* MISSION_HUNT_INFO_EX (PACKETVER >= 20150513)
*/
struct packet_mission_info_sub {
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ uint32 huntIdent;
+ uint32 huntIdent2;
+ uint32 mobType;
+#elif PACKETVER >= 20150513
uint32 huntIdent;
uint32 mobType;
#endif
@@ -1519,7 +1518,7 @@ struct PACKET_ZC_ADD_ITEM_TO_MAIL {
int8 result;
int16 index;
int16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -1537,7 +1536,7 @@ struct PACKET_ZC_ADD_ITEM_TO_MAIL {
struct mail_item {
int16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -1786,6 +1785,7 @@ struct PACKET_ZC_GROUP_LIST {
struct PACKET_ZC_GROUP_LIST_SUB members[];
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
struct PACKET_ZC_CLANINFO {
int16 PacketType;
int16 PacketLength;
@@ -1796,6 +1796,8 @@ struct PACKET_ZC_CLANINFO {
uint8 AllyCount;
uint8 AntagonistCount;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_CLANINFO, 0x098a);
+#endif
struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO {
int16 PacketType;
@@ -1819,7 +1821,11 @@ struct PACKET_ZC_NOTIFY_CLAN_CHAT {
* PACKET_ZC_MISSION_HUNT_EX (PACKETVER >= 20150513)
*/
struct packet_quest_hunt_sub {
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ uint32 huntIdent;
+ uint32 huntIdent2;
+ uint32 mobType;
+#elif PACKETVER >= 20150513
uint32 huntIdent;
uint32 mobType;
#endif
@@ -1853,7 +1859,10 @@ struct packet_quest_add_header {
*/
struct packet_quest_update_hunt {
uint32 questID;
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+ uint32 huntIdent;
+ uint32 huntIdent2;
+#elif PACKETVER >= 20150513
uint32 huntIdent;
#else
uint32 mob_id;
@@ -1906,7 +1915,9 @@ struct PACKET_ZC_FORMATSTRING_MSG_COLOR {
uint16 PacketType;
uint16 PacketLength;
uint16 messageId;
+#if PACKETVER >= 20160406
uint32 color;
+#endif
char messageString[];
} __attribute__((packed));
@@ -1938,7 +1949,7 @@ struct PACKET_ZC_UI_ACTION {
struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST {
int16 PacketType;
char mapName[MAP_NAME_LENGTH_EXT];
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -1984,7 +1995,7 @@ struct pet_evolution_items {
struct PACKET_CZ_PET_EVOLUTION {
int16 PacketType;
uint16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 EvolvedPetEggID;
#else
uint16 EvolvedPetEggID;
@@ -2018,7 +2029,7 @@ struct PACKET_ZC_NOTIFY_PLAYERCHAT {
struct PACKET_ZC_ITEM_ENTRY {
int16 packetType;
uint32 AID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2035,7 +2046,7 @@ struct PACKET_ZC_ADD_ITEM_TO_STORE {
int16 packetType;
int16 index;
int32 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2054,7 +2065,7 @@ struct PACKET_ZC_ADD_ITEM_TO_STORE {
struct PACKET_ZC_MVP_GETTING_ITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2064,7 +2075,7 @@ struct PACKET_ZC_MVP_GETTING_ITEM {
struct PACKET_ZC_ACK_TOUSESKILL {
int16 packetType;
uint16 skillId;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
int32 btype;
uint32 itemId;
#else
@@ -2079,7 +2090,7 @@ struct PACKET_ZC_ADD_ITEM_TO_CART {
int16 packetType;
int16 index;
int32 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2098,7 +2109,7 @@ struct PACKET_ZC_ADD_ITEM_TO_CART {
struct PACKET_CZ_REQMAKINGITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 material[3];
#else
@@ -2110,7 +2121,7 @@ struct PACKET_CZ_REQMAKINGITEM {
struct PACKET_ZC_ACK_REQMAKINGITEM {
int16 packetType;
int16 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2120,7 +2131,7 @@ struct PACKET_ZC_ACK_REQMAKINGITEM {
struct PACKET_ZC_FEED_PET {
int16 packetType;
uint8 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2130,7 +2141,7 @@ struct PACKET_ZC_FEED_PET {
struct PACKET_ZC_FEED_MER {
int16 packetType;
uint8 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2140,7 +2151,7 @@ struct PACKET_ZC_FEED_MER {
struct PACKET_ZC_USE_ITEM_ACK {
int16 packetType;
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 AID;
#elif PACKETVER >= 3
@@ -2155,7 +2166,7 @@ struct PACKET_ZC_SPRITE_CHANGE {
int16 packetType;
uint32 AID;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 val;
uint32 val2;
#elif PACKETVER >= 4
@@ -2168,7 +2179,7 @@ struct PACKET_ZC_SPRITE_CHANGE {
struct PACKET_ZC_ADD_EXCHANGE_ITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint8 itemType;
int32 amount;
@@ -2191,7 +2202,7 @@ struct PACKET_ZC_ADD_EXCHANGE_ITEM {
struct PACKET_ZC_CASH_TIME_COUNTER {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2202,7 +2213,7 @@ struct PACKET_ZC_CASH_TIME_COUNTER {
struct PACKET_ZC_CASH_ITEM_DELETE {
int16 packetType;
uint16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2212,7 +2223,7 @@ struct PACKET_ZC_CASH_ITEM_DELETE {
struct PACKET_ZC_ITEM_PICKUP_PARTY {
int16 packetType;
uint32 AID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2227,7 +2238,7 @@ struct PACKET_ZC_ITEM_PICKUP_PARTY {
struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2246,13 +2257,15 @@ struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
struct PACKET_ZC_ACK_WEAPONREFINE {
int16 packetType;
int32 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
#endif
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+// PACKET_ZC_PROPERTY_HOMUN2
struct PACKET_ZC_PROPERTY_HOMUN {
int16 packetType;
char name[NAME_LENGTH];
@@ -2261,7 +2274,7 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint16 level;
uint16 hunger;
uint16 intimacy;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2283,11 +2296,46 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint16 skillPoints;
uint16 range;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
+#elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
+// PACKET_ZC_PROPERTY_HOMUN1
+struct PACKET_ZC_PROPERTY_HOMUN {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
+ uint8 flags;
+ uint16 level;
+ uint16 hunger;
+ uint16 intimacy;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint16 atk2;
+ uint16 matk;
+ uint16 hit;
+ uint16 crit;
+ uint16 def;
+ uint16 mdef;
+ uint16 flee;
+ uint16 amotion;
+ uint16 hp;
+ uint16 maxHp;
+ uint16 sp;
+ uint16 maxSp;
+ uint32 exp;
+ uint32 expNext;
+ uint16 skillPoints;
+ uint16 range;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x022e);
+#endif
struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
int16 packetType;
uint16 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2297,7 +2345,7 @@ struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
struct PACKET_CZ_REQ_ITEMREPAIR {
int16 packetType;
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2309,7 +2357,7 @@ struct PACKET_CZ_REQ_ITEMREPAIR {
struct PACKET_CZ_REQ_MAKINGITEM {
int16 packetType;
int16 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2320,7 +2368,7 @@ struct PACKET_CZ_SSILIST_ITEM_CLICK {
int16 packetType;
uint32 AID;
uint32 storeId;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2328,7 +2376,7 @@ struct PACKET_CZ_SSILIST_ITEM_CLICK {
} __attribute__((packed));
struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2349,7 +2397,7 @@ struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub {
int16 index;
int16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2374,7 +2422,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub {
uint32 price;
uint32 discountPrice;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2389,7 +2437,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST {
struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub {
uint16 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2403,7 +2451,7 @@ struct PACKET_CZ_PC_PURCHASE_ITEMLIST {
} __attribute__((packed));
struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2425,7 +2473,7 @@ struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub {
uint32 price;
uint16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2445,7 +2493,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
uint16 amount;
int16 index;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2478,7 +2526,7 @@ struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub {
uint32 price;
uint16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2496,7 +2544,7 @@ struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE {
struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2513,7 +2561,7 @@ struct PACKET_CZ_REQ_TRADE_BUYING_STORE {
} __attribute__((packed));
struct PACKET_ZC_MAKABLEITEMLIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 material[3];
#else
@@ -2529,7 +2577,7 @@ struct PACKET_ZC_MAKABLEITEMLIST {
} __attribute__((packed));
struct PACKET_ZC_MAKINGARROW_LIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2544,7 +2592,7 @@ struct PACKET_ZC_MAKINGARROW_LIST {
struct PACKET_ZC_REPAIRITEMLIST_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2561,7 +2609,7 @@ struct PACKET_ZC_REPAIRITEMLIST {
struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2577,7 +2625,7 @@ struct PACKET_ZC_NOTIFY_WEAPONITEMLIST {
} __attribute__((packed));
struct PACKET_ZC_MAKINGITEM_LIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2587,7 +2635,7 @@ struct PACKET_ZC_MAKINGITEM_LIST_sub {
struct PACKET_ZC_MAKINGITEM_LIST {
int16 packetType;
int16 packetLength;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 makeItem;
#else
uint16 makeItem;
@@ -2599,7 +2647,7 @@ struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub {
uint32 price;
uint32 discountPrice;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2618,7 +2666,7 @@ struct PACKET_ZC_PC_CASH_POINT_ITEMLIST {
struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub {
uint16 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2642,7 +2690,7 @@ struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM {
} __attribute__((packed));
struct PACKET_CZ_SEARCH_STORE_INFO_item {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2667,7 +2715,7 @@ struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
uint32 storeId;
uint32 AID;
char shopName[MESSAGE_SIZE];
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2722,7 +2770,7 @@ struct packet_achievement_update {
struct packet_achievement_reward_ack {
uint16 packet_id;
- uint8 received;
+ uint8 failed;
uint32 ach_id;
} __attribute__((packed));
@@ -2734,17 +2782,46 @@ struct packet_reqname_ack {
} __attribute__((packed));
// ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
-struct packet_reqnameall_ack {
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_REQNAMEALL {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
+ char party_name[NAME_LENGTH];
+ char guild_name[NAME_LENGTH];
+ char position_name[NAME_LENGTH];
+ int32 title_id;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0a30);
+#else
+struct PACKET_ZC_ACK_REQNAMEALL {
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
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0195);
#endif
+
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+struct PACKET_ZC_ACK_REQNAME_TITLE {
+ uint16 packet_id;
+ int32 gid;
+ int32 groupId;
+ char name[NAME_LENGTH];
+ char title[NAME_LENGTH];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0adf);
+#else
+struct PACKET_ZC_ACK_REQNAME_TITLE {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0095);
+#endif
struct PACKET_ZC_OVERWEIGHT_PERCENT {
int16 packetType;
@@ -2836,6 +2913,482 @@ struct PACKET_CZ_MEMORIALDUNGEON_COMMAND {
int32 command;
} __attribute__((packed));
+struct PACKET_ZC_REMOVE_EFFECT {
+ int16 packetType;
+ uint32 aid;
+ uint32 effectId;
+} __attribute__((packed));
+
+#if PACKETVER >= 20160525
+struct PACKET_ZC_CAMERA_INFO {
+ int16 packetType;
+ int8 action;
+ float range;
+ float rotation;
+ float latitude;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_CAMERA_INFO, 0x0a78);
+#endif
+
+#if PACKETVER >= 20160525
+struct PACKET_CZ_CAMERA_INFO {
+ int16 packetType;
+ int8 action;
+ float range;
+ float rotation;
+ float latitude;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_CAMERA_INFO, 0x0a77);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
+// PACKET_ZC_AUTOSPELLLIST2
+struct PACKET_ZC_AUTOSPELLLIST {
+ int16 packetType;
+ int16 packetLength;
+ int skills[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x0afb);
+#elif PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
+// PACKET_ZC_AUTOSPELLLIST1
+struct PACKET_ZC_AUTOSPELLLIST {
+ int16 packetType;
+ int skills[7];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x01cd);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+#if PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
+struct PACKET_ZC_ITEM_PREVIEW {
+ int16 packetType;
+ int16 index;
+ int8 isDamaged;
+ int16 refiningLevel;
+ struct EQUIPSLOTINFO slot;
+ struct ItemOptions option_data[MAX_ITEM_OPTIONS];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ITEM_PREVIEW, 0x0b13);
+#else // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
+
+struct PACKET_ZC_ITEM_PREVIEW {
+ int16 packetType;
+ int16 index;
+ int16 refiningLevel;
+ struct EQUIPSLOTINFO slot;
+ struct ItemOptions option_data[MAX_ITEM_OPTIONS];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ITEM_PREVIEW, 0x0ab9);
+#endif // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
+#endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+
+#if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ENCHANT_EQUIPMENT {
+ int16 packetType;
+ int16 wearState;
+ int16 cardSlot;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ int32 itemId;
+#else
+ int16 itemId;
+#endif
+ int8 equipFlag;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ENCHANT_EQUIPMENT, 0x0a3f);
+#endif // PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
+
+#if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_SERVICE_MESSAGE_COLOR {
+ int16 packetType;
+ int16 packetLength;
+ int32 color;
+ char message[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SERVICE_MESSAGE_COLOR, 0x0adb);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
+struct PACKET_CZ_START_USE_SKILL {
+ int16 packetType;
+ int16 skillId;
+ int16 skillLv;
+ uint32 targetId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_START_USE_SKILL, 0x0b10);
+
+struct PACKET_CZ_STOP_USE_SKILL {
+ int16 packetType;
+ int16 skillId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_STOP_USE_SKILL, 0x0b11);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_INVENTORY_EXPANSION_INFO {
+ int16 packetType;
+ int16 expansionSize;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_INVENTORY_EXPANSION_INFO, 0x0b18);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_ACK_INVENTORY_EXPAND {
+ int16 packetType;
+ uint8 result;
+ uint32 itemId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND, 0x0b15);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT {
+ int16 packetType;
+ uint8 result;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND_RESULT, 0x0b17);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND, 0x0b14);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND_CONFIRMED {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_CONFIRMED, 0x0b16);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND_REJECTED {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_REJECTED, 0x0b19);
+#endif
+
+struct PACKET_CZ_REQ_REMAINTIME {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REQ_REMAINTIME, 0x01c0);
+
+struct PACKET_CZ_PARTY_CONFIG {
+ int16 packetType;
+ uint8 refuseInvite;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_ZC_NPC_BARTER_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
+#else
+ uint16 nameid;
+#endif
+ uint8 type;
+ uint32 amount;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 currencyNameid;
+#else
+ uint16 currencyNameid;
+#endif
+ uint32 currencyAmount;
+ uint32 weight;
+ uint32 index;
+} __attribute__((packed));
+
+struct PACKET_ZC_NPC_BARTER_OPEN {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_ZC_NPC_BARTER_OPEN_sub list[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_NPC_BARTER_OPEN, 0x0b0e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_CZ_NPC_BARTER_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_BARTER_CLOSE, 0x0b12);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_CZ_NPC_BARTER_PURCHASE_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint32 amount;
+ uint16 invIndex;
+ uint32 shopIndex;
+} __attribute__((packed));
+
+struct PACKET_CZ_NPC_BARTER_PURCHASE {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_CZ_NPC_BARTER_PURCHASE_sub list[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_BARTER_PURCHASE, 0x0b0f);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+ uint32 unknown;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
+#elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
+#elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_CLIENT_VERSION {
+ int16 packetType;
+ uint32 clientVersion;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+struct PACKET_CZ_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_PING, 0x0b1c);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190213 || PACKETVER_RE_NUM >= 20190213 || PACKETVER_ZERO_NUM >= 20190130
+struct PACKET_ZC_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PING, 0x0b1d);
+#endif
+
+#if PACKETVER >= 20160622
+struct PACKET_CZ_COOLDOWN_RESET {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_COOLDOWN_RESET, 0x0a88);
+#endif
+
+#if PACKETVER >= 20151104
+struct PACKET_CZ_STYLE_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_STYLE_CLOSE, 0x0a48);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
+struct PACKET_ZC_LOAD_CONFIRM {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_LOAD_CONFIRM, 0x0b1b);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_PARTY_CONFIG {
+ int16 packetType;
+ uint8 denyPartyInvites;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9);
+#endif
+
+struct PACKET_ZC_ROLE_CHANGE {
+ int16 packetType;
+ int32 flag;
+ char name[NAME_LENGTH];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ROLE_CHANGE, 0x00e1);
+
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_BAN_LIST_sub {
+ int char_id;
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0a87);
+// version unconfirmed
+#elif PACKETVER >= 20100803
+struct PACKET_ZC_BAN_LIST_sub {
+ char char_name[NAME_LENGTH];
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
+#else
+struct PACKET_ZC_BAN_LIST_sub {
+ char char_name[NAME_LENGTH];
+ char account_name[NAME_LENGTH];
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_CLOSE_ROULETTE {
+ int16 packetType;
+ uint8 result;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_ROULETTE, 0x0a1e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_MERGE_ITEM {
+ int16 packetType;
+ int16 index;
+ int16 amount;
+ uint8 reason;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_MERGE_ITEM, 0x096f);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_MERGE_ITEM_OPEN_sub {
+ int16 index;
+} __attribute__((packed));
+
+struct PACKET_ZC_MERGE_ITEM_OPEN {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_MERGE_ITEM_OPEN_sub items[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_MERGE_ITEM_OPEN, 0x096d);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT {
+ int16 packetType;
+ uint32 itemId; // unused
+ uint16 result;
+ uint32 cashPoints;
+ uint32 kafraPoints;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SE_PC_BUY_CASHITEM_RESULT, 0x0849);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_OPEN_WINDOW {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_OPEN_WINDOW, 0x0aa0);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_REFINE_ADD_ITEM {
+ int16 packetType;
+ int16 index;
+};
+DEFINE_PACKET_HEADER(CZ_REFINE_ADD_ITEM, 0x0aa1);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_ADD_ITEM_SUB {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 chance;
+ int32 zeny;
+} __attribute__((packed));
+
+struct PACKET_ZC_REFINE_ADD_ITEM {
+ int16 packetType;
+ int16 packtLength;
+ int16 itemIndex;
+ int8 blacksmithBlessing;
+ struct PACKET_ZC_REFINE_ADD_ITEM_SUB req[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_ADD_ITEM, 0x0aa2);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_REFINE_ITEM_REQUEST {
+ int16 packetType;
+ int16 index;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 blacksmithBlessing;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REFINE_ITEM_REQUEST, 0x0aa3);
+
+struct PACKET_CZ_REFINE_WINDOW_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REFINE_WINDOW_CLOSE, 0x0aa4);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_STATUS {
+ int16 packetType;
+ char name[NAME_LENGTH];
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 refine_level;
+ int8 status;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada);
+#endif
+
#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