diff options
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r-- | src/map/packets_struct.h | 266 |
1 files changed, 258 insertions, 8 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e461eebe9..03b555e2b 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -76,8 +76,10 @@ enum packet_headers { additemType = 0x2d4, #elif PACKETVER < 20150226 additemType = 0x990, -#else +#elif PACKETVER < 20160921 additemType = 0xa0c, +#else + additemType = 0xa37, #endif #if PACKETVER < 4 idle_unitType = 0x78, @@ -141,8 +143,11 @@ enum packet_headers { authokType = 0x73, #elif PACKETVER < 20141022 authokType = 0x2eb, -#else +// Some clients smaller than 20160330 cant be tested [4144] +#elif PACKETVER < 20160330 authokType = 0xa18, +#else + authokType = 0x2eb, #endif script_clearType = 0x8d6, package_item_announceType = 0x7fd, @@ -286,7 +291,7 @@ enum packet_headers { maptypeproperty2Type = 0x99b, npcmarketresultackType = 0x9d7, npcmarketopenType = 0x9d5, -#if PACKETVER >= 20131223 +#if PACKETVER >= 20131223 // version probably can be 20131030 [4144] wisendType = 0x9df, #else wisendType = 0x98, @@ -302,6 +307,29 @@ enum packet_headers { #else // PACKETVER < 20141022 questListType = 0x2b1, ///< ZC_ALL_QUEST_LIST #endif // PACKETVER >= 20141022 + /* Rodex */ + rodexicon = 0x09E7, + rodexread = 0x09EB, + rodexwriteresult = 0x09ED, + rodexnextpage = 0x09F0, + rodexgetzeny = 0x09F2, + rodexgetitem = 0x09F4, + rodexdelete = 0x09F6, + rodexadditem = 0x0A05, + rodexremoveitem = 0x0A07, + rodexopenwrite = 0x0A12, +#if PACKETVER < 20160601 + rodexmailList = 0x09F0, +#elif PACKETVER < 20170419 + rodexmailList = 0x0A7D, +#else // PACKETVER >= 20170419 + rodexmailList = 0x0Ac2, +#endif +#if PACKETVER < 20160316 + rodexcheckplayer = 0x0A14, +#else // PACKETVER >= 20160316 + rodexcheckplayer = 0x0A51, +#endif }; #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute @@ -343,7 +371,7 @@ struct NORMALITEM_INFO { #endif } __attribute__((packed)); -struct RndOptions { +struct ItemOptions { int16 index; int16 value; uint8 param; @@ -379,7 +407,7 @@ struct EQUIPITEM_INFO { #endif #if PACKETVER >= 20150226 uint8 option_count; - struct RndOptions option_data[5]; + struct ItemOptions option_data[MAX_ITEM_OPTIONS]; #endif #if PACKETVER >= 20120925 struct { @@ -400,7 +428,8 @@ struct packet_authok { #if PACKETVER >= 20080102 int16 font; #endif -#if PACKETVER >= 20141022 +// Some clients smaller than 20160330 cant be tested [4144] +#if PACKETVER >= 20141022 && PACKETVER < 20160330 uint8 sex; #endif } __attribute__((packed)); @@ -442,7 +471,11 @@ struct packet_additem { uint16 bindOnEquipType; #endif #if PACKETVER >= 20150226 - struct RndOptions option_data[5]; + struct ItemOptions option_data[MAX_ITEM_OPTIONS]; +#endif +#if PACKETVER >= 20160921 + uint8 favorite; + uint16 look; #endif } __attribute__((packed)); @@ -589,6 +622,9 @@ struct packet_spawn_unit { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -598,7 +634,7 @@ struct packet_unit_walking { #if PACKETVER >= 20091103 int16 PacketLength; #endif -#if PACKETVER > 20071106 +#if PACKETVER >= 20071106 uint8 objecttype; #endif #if PACKETVER >= 20131223 @@ -657,6 +693,9 @@ struct packet_unit_walking { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -723,6 +762,9 @@ struct packet_idle_unit { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -1228,6 +1270,214 @@ struct packet_whisper_message { char message[]; } __attribute__((packed)); +/* RoDEX */ +struct PACKET_CZ_ADD_ITEM_TO_MAIL { + int16 PacketType; + int16 index; + int16 count; +} __attribute__((packed)); + +struct PACKET_ZC_ADD_ITEM_TO_MAIL { + int16 PacketType; + int8 result; + int16 index; + int16 count; + uint16 ITID; + int8 type; + int8 IsIdentified; + int8 IsDamaged; + int8 refiningLevel; + struct EQUIPSLOTINFO slot; + struct ItemOptions optionData[MAX_ITEM_OPTIONS]; + int16 weight; + int8 unknow[5]; +} __attribute__((packed)); + +struct mail_item { + int16 count; + uint16 ITID; + int8 IsIdentified; + int8 IsDamaged; + int8 refiningLevel; + struct EQUIPSLOTINFO slot; + int8 unknow1[4]; + int8 type; + int8 unknown[4]; + struct ItemOptions optionData[MAX_ITEM_OPTIONS]; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_OPEN_WRITE_MAIL { + int16 PacketType; + char receiveName[NAME_LENGTH]; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_OPEN_WRITE_MAIL { + int16 PacketType; + char receiveName[NAME_LENGTH]; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL { + int16 PacketType; + int16 index; + uint16 cnt; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL { + int16 PacketType; + int8 result; + int16 index; + uint16 cnt; + int16 weight; +} __attribute__((packed)); + +struct PACKET_CZ_SEND_MAIL { + int16 PacketType; + int16 PacketLength; + char receiveName[24]; + char senderName[24]; + int64 zeny; + int16 Titlelength; + int16 TextcontentsLength; +#if PACKETVER > 20160600 + int32 receiver_char_id; +#endif // PACKETVER > 20160600 + char string[]; +} __attribute__((packed)); + +struct PACKET_ZC_WRITE_MAIL_RESULT { + int16 PacketType; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_CHECKNAME { + int16 PacketType; + char Name[24]; +} __attribute__((packed)); + +struct PACKET_ZC_CHECKNAME { + int16 PacketType; + int32 CharId; + int16 Class; + int16 BaseLevel; +#if PACKETVER >= 20160316 + char Name[24]; +#endif +} __attribute__((packed)); + +struct PACKET_ZC_NOTIFY_UNREADMAIL { + int16 PacketType; + char result; +} __attribute__((packed)); + +struct maillistinfo { +#if PACKETVER >= 20170419 + uint8 openType; +#endif + int64 MailID; + int8 Isread; + uint8 type; + char SenderName[24]; +#if PACKETVER < 20170419 + int32 regDateTime; +#endif + int32 expireDateTime; + int16 Titlelength; + char title[]; +} __attribute__((packed)); + +struct PACKET_ZC_MAIL_LIST { + int16 PacketType; + int16 PacketLength; +#if PACKETVER < 20170419 + int8 opentype; + int8 cnt; +#endif + int8 IsEnd; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_NEXT_MAIL_LIST { + int16 PacketType; + int8 opentype; + int64 Lower_MailID; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_OPEN_MAIL { + int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else + int8 opentype; + int64 Upper_MailID; +#endif +} __attribute__((packed)); + +struct PACKET_CZ_REQ_READ_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_ZC_READ_MAIL { + int16 PacketType; + int16 PacketLength; + int8 opentype; + int64 MailID; + int16 TextcontentsLength; + int64 zeny; + int8 ItemCnt; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_DELETE_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_DELETE_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_REFRESH_MAIL_LIST { + int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else + int8 opentype; + int64 Upper_MailID; +#endif +} __attribute__((packed)); + +struct PACKET_CZ_REQ_ZENY_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_ZENY_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_ITEM_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_ITEM_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; + int8 result; +} __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 |