diff options
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r-- | src/map/packets_struct.h | 306 |
1 files changed, 281 insertions, 25 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 2da1ece9e..9c8c93865 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -300,7 +300,6 @@ enum packet_headers { notifybindonequip = 0x2d3, monsterhpType = 0x977, maptypeproperty2Type = 0x99b, - npcmarketresultackType = 0x9d7, #if PACKETVER >= 20131223 // version probably can be 20131030 [4144] wisendType = 0x9df, #else @@ -1362,22 +1361,6 @@ struct packet_npc_market_purchase { } 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)); -struct packet_npc_market_result_ack { - int16 PacketType; - int16 PacketLength; - uint8 result; - struct { -#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)); - #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 { @@ -1423,7 +1406,7 @@ struct hotkey_data { int16 count; // Item Quantity/Skill Level } __attribute__((packed)); -#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 +#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605 #define MAX_HOTKEYS_PACKET 38 struct PACKET_ZC_SHORTCUT_KEY_LIST { int16 packetType; @@ -1472,7 +1455,7 @@ struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 { DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba); #endif -#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 +#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605 struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 { int16 packetType; uint16 tab; @@ -1490,7 +1473,7 @@ struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 { DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01); #endif -#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 +#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605 struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 { int16 packetType; uint16 tab; @@ -2326,7 +2309,35 @@ struct PACKET_ZC_ACK_WEAPONREFINE { #endif } __attribute__((packed)); -#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO) +#if PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626 +// PACKET_ZC_PROPERTY_HOMUN3 +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; + uint16 atk2; + uint16 matk; + uint16 hit; + uint16 crit; + uint16 def; + uint16 mdef; + uint16 flee; + uint16 amotion; + uint32 hp; + uint32 maxHp; + uint16 sp; + uint16 maxSp; + uint32 exp; + uint32 expNext; + uint16 skillPoints; + uint16 range; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0b2f); +#elif PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO) // PACKET_ZC_PROPERTY_HOMUN2 struct PACKET_ZC_PROPERTY_HOMUN { int16 packetType; @@ -2651,6 +2662,7 @@ struct PACKET_ZC_MAKINGARROW_LIST { int16 packetLength; struct PACKET_ZC_MAKINGARROW_LIST_sub items[]; } __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_MAKINGARROW_LIST, 0x01ad); struct PACKET_ZC_REPAIRITEMLIST_sub { int16 index; @@ -2697,13 +2709,10 @@ struct PACKET_ZC_MAKINGITEM_LIST_sub { struct PACKET_ZC_MAKINGITEM_LIST { int16 packetType; int16 packetLength; -#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 - uint32 makeItem; -#else uint16 makeItem; -#endif struct PACKET_ZC_MAKINGITEM_LIST_sub items[]; } __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_MAKINGITEM_LIST, 0x025a); struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub { uint32 price; @@ -3451,6 +3460,253 @@ struct PACKET_ZC_REFINE_STATUS { DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada); #endif +struct PACKET_ZC_ACK_RANKING_name { + char name[NAME_LENGTH]; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_RANKING_points { + uint32 points; +} __attribute__((packed)); + +#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724 +struct PACKET_ZC_ACK_RANKING_sub { + char name[NAME_LENGTH]; + uint32 points; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_RANKING { + int16 packetType; + int16 rankType; + uint32 chars[10]; + uint32 points[10]; + uint32 myPoints; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x0af6); +#elif PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO) +struct PACKET_ZC_ACK_RANKING_sub { + struct PACKET_ZC_ACK_RANKING_name names[10]; + struct PACKET_ZC_ACK_RANKING_points points[10]; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_RANKING { + int16 packetType; + int16 rankType; + struct PACKET_ZC_ACK_RANKING_sub ranks; + uint32 myPoints; +} __attribute__((packed)); + +DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x097d); +#else +struct PACKET_ZC_ACK_RANKING_sub { + struct PACKET_ZC_ACK_RANKING_name names[10]; + struct PACKET_ZC_ACK_RANKING_points points[10]; +} __attribute__((packed)); +#endif + +struct PACKET_ZC_STATUS_CHANGE_ACK { + int16 packetType; + uint16 sp; + uint8 ok; + uint8 value; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE_ACK, 0x00bc); + +#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO) +struct PACKET_ZC_HAT_EFFECT { + int16 packetType; + int16 packetLength; + uint32 aid; + int8 status; + uint16 effects[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_HAT_EFFECT, 0x0a3b); +#endif + +// [4144] this struct updated not in all packets in client +#if PACKETVER_RE_NUM >= 20190807 +struct SKILLDATA { + uint16 id; + int inf; + uint16 level; + uint16 sp; + uint16 range2; + uint8 upFlag; + uint16 level2; +} __attribute__((packed)); +#else +struct SKILLDATA { + uint16 id; + int inf; + uint16 level; + uint16 sp; + uint16 range2; + char name[NAME_LENGTH]; + uint8 upFlag; +} __attribute__((packed)); +#endif + +struct PACKET_ZC_ADD_SKILL { + int16 packetType; + struct SKILLDATA skill; +} __attribute__((packed)); +#if PACKETVER_RE_NUM >= 20190807 +DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31); +#else +DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111); +#endif + +struct PACKET_ZC_SKILLINFO_LIST { + int16 packetType; + int16 packetLength; + struct SKILLDATA skills[]; +} __attribute__((packed)); +#if PACKETVER_RE_NUM >= 20190807 +DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32); +#else +DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f); +#endif + +#if PACKETVER_RE_NUM >= 20190807 +struct PACKET_ZC_SKILLINFO_UPDATE2 { + int16 packetType; + uint16 id; + int inf; + uint16 level; + uint16 sp; + uint16 range2; + uint8 upFlag; + uint16 level2; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x0b33); +#else +struct PACKET_ZC_SKILLINFO_UPDATE2 { + int16 packetType; + uint16 id; + int inf; + uint16 level; + uint16 sp; + uint16 range2; + uint8 upFlag; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x07e1); +#endif + +struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub { +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + uint32 ITID; +#else + uint16 ITID; +#endif + uint16 qty; + uint32 price; +} __attribute__((packed)); + +#if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814 +struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT { + int16 PacketType; + int16 PacketLength; + uint16 result; + struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x0b4e); +#elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO) +struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT { + int16 PacketType; + int16 PacketLength; + uint8 result; + struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x09d7); +#endif + +struct PACKET_ZC_TALKBOX_CHATCONTENTS { + int16 PacketType; + uint32 aid; + char message[TALKBOX_MESSAGE_SIZE]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_TALKBOX_CHATCONTENTS, 0x0191); + +#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814 +struct PACKET_ZC_GUILD_CASTLE_LIST { + int16 packetType; + int16 packetLength; + int8 castle_list[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_GUILD_CASTLE_LIST, 0x0b27); +#endif + +#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515 +struct PACKET_CZ_CASTLE_TELEPORT_REQUEST { + int16 packetType; + int8 castle_id; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_CASTLE_TELEPORT_REQUEST, 0x0b28); +#endif + +#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814 +struct PACKET_ZC_CASTLE_TELEPORT_RESPONSE { + int16 packetType; + int16 result; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_CASTLE_TELEPORT_RESPONSE, 0x0b2e); +#endif + +#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814 +struct PACKET_ZC_CASTLE_INFO { + int16 packetType; + int8 castle_id; + int32 economy; + int32 defense; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_CASTLE_INFO, 0x0b2d); +#endif + +#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515 +struct PACKET_CZ_CASTLE_INFO_REQUEST { + int16 packetType; + int8 castle_id; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_CASTLE_INFO_REQUEST, 0x0b2c); +#endif + +#if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO) +struct PACKET_ZC_LAPINEDDUKDDAK_OPEN { + int16 packetType; +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + int32 itemId; +#else + int16 itemId; +#endif +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_LAPINEDDUKDDAK_OPEN, 0x0a4e); +#endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO) + +#if PACKETVER >= 20160302 +struct PACKET_CZ_LAPINEDDUKDDAK_ACK_sub { + int16 index; + int16 count; +} __attribute__((packed)); + +struct PACKET_CZ_LAPINEDDUKDDAK_ACK { + int16 packetType; + int16 packetLength; +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + int32 itemId; +#else + int16 itemId; +#endif + struct PACKET_CZ_LAPINEDDUKDDAK_ACK_sub items[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_LAPINEDDUKDDAK_ACK, 0x0a4f); +#endif // PACKETVER >= 20160302 + +#if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO) +struct PACKET_ZC_LAPINEDDUKDDAK_RESULT { + int16 packetType; + int16 result; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_LAPINEDDUKDDAK_RESULT, 0x0a50); +#endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO) #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) |