diff options
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r-- | src/map/packets_struct.h | 214 |
1 files changed, 190 insertions, 24 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e6d207fad..9248d96c8 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 @@ -416,6 +433,18 @@ enum packet_headers { #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 @@ -1145,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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#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]; } __attribute__((packed)); -struct packet_storelist_equip { +struct ZC_INVENTORY_START { + int16 packetType; +#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 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + 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 || PACKETVER_MAIN_NUM >= 20181002 + uint8 invType; +#endif +#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]; @@ -1221,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)); @@ -1350,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)); @@ -1835,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; @@ -1883,9 +1958,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 { @@ -2191,8 +2274,13 @@ struct PACKET_ZC_PROPERTY_HOMUN { uint16 mdef; uint16 flee; uint16 amotion; +#if PACKETVER < 20150513 + uint16 hp; + uint16 maxHp; +#else uint32 hp; uint32 maxHp; +#endif uint16 sp; uint16 maxSp; uint32 exp; @@ -2639,7 +2727,7 @@ struct packet_achievement_update { struct packet_achievement_reward_ack { uint16 packet_id; - uint8 received; + uint8 failed; uint32 ach_id; } __attribute__((packed)); @@ -2690,6 +2778,84 @@ struct PACKET_ZC_GROUP_ISALIVE { 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)); + +struct PACKET_ZC_REMOVE_EFFECT { + int16 packetType; + uint32 aid; + uint32 effectId; +} __attribute__((packed)); + +struct PACKET_ZC_CAMERA_INFO { + int16 packetType; + int8 action; + float range; + float rotation; + float latitude; +} __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 |