diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-10-02 21:54:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-10-02 21:54:24 +0300 |
commit | 9d231a25d73d7a9cc692128cca808e8b66a98bcd (patch) | |
tree | d4319055e2956c46d7406642f0b8e02f1d89c267 /src | |
parent | 658a0b6854d819d9609b39f49cf135c0493fde11 (diff) | |
download | hercules-9d231a25d73d7a9cc692128cca808e8b66a98bcd.tar.gz hercules-9d231a25d73d7a9cc692128cca808e8b66a98bcd.tar.bz2 hercules-9d231a25d73d7a9cc692128cca808e8b66a98bcd.tar.xz hercules-9d231a25d73d7a9cc692128cca808e8b66a98bcd.zip |
Update inventory packets for 2018-10-02 main clients.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 38 | ||||
-rw-r--r-- | src/map/packets_struct.h | 32 |
2 files changed, 35 insertions, 35 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index a3650821c..23519fc0c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2789,11 +2789,11 @@ static void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item * static void clif_inventoryList(struct map_session_data *sd) { -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); #endif clif->inventoryItems(sd, INVTYPE_INVENTORY); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 clif->inventoryEnd(sd, INVTYPE_INVENTORY); #endif } @@ -2816,7 +2816,7 @@ static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type if (normal) { itemlist_normal.PacketType = inventorylistnormalType; itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 itemlist_normal.invType = type; #endif @@ -2829,7 +2829,7 @@ static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type if( equip ) { itemlist_equip.PacketType = inventorylistequipType; itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 itemlist_equip.invType = type; #endif @@ -2849,7 +2849,7 @@ static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type static void clif_equipList(struct map_session_data *sd) { -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); clif->inventoryItems(sd, INVTYPE_INVENTORY); clif->inventoryEnd(sd, INVTYPE_INVENTORY); @@ -2876,7 +2876,7 @@ static void clif_equipItems(struct map_session_data *sd, enum inventory_type typ if (equip) { itemlist_equip.PacketType = inventorylistequipType; itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 itemlist_equip.invType = type; #endif @@ -2914,7 +2914,7 @@ static void clif_guildStorageList(struct map_session_data *sd, struct item *item static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) { -#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 nullpo_retv(sd); nullpo_retv(name); @@ -2922,10 +2922,10 @@ static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type memset(buf, 0, sizeof(buf)); struct ZC_INVENTORY_START *p = (struct ZC_INVENTORY_START *)buf; p->packetType = 0xb08; -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 p->invType = type; #endif -#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 int strLen = (int)safestrnlen(name, 24); if (strLen > 24) strLen = 24; @@ -2942,12 +2942,12 @@ static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type static void clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) { -#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 nullpo_retv(sd); struct ZC_INVENTORY_END p; p.packetType = 0xb0b; -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 p.invType = type; #endif p.flag = 0; @@ -2983,10 +2983,10 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t storelist_normal.PacketType = storageListNormalType; storelist_normal.PacketLength = ( sizeof( storelist_normal ) - sizeof( storelist_normal.list ) ) + (sizeof(struct NORMALITEM_INFO) * normal); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 storelist_normal.invType = type; #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 safestrncpy(storelist_normal.name, "Storage", NAME_LENGTH); #endif @@ -2997,10 +2997,10 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t storelist_equip.PacketType = storageListEquipType; storelist_equip.PacketLength = ( sizeof( storelist_equip ) - sizeof( storelist_equip.list ) ) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 storelist_equip.invType = type; #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 safestrncpy(storelist_equip.name, "Storage", NAME_LENGTH); #endif @@ -3013,11 +3013,11 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t static void clif_cartList(struct map_session_data *sd) { -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 clif->inventoryStart(sd, INVTYPE_CART, ""); #endif clif->cartItems(sd, INVTYPE_CART); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 clif->inventoryEnd(sd, INVTYPE_CART); #endif } @@ -3043,7 +3043,7 @@ static void clif_cartItems(struct map_session_data *sd, enum inventory_type type if (normal) { itemlist_normal.PacketType = cartlistnormalType; itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 itemlist_normal.invType = type; #endif @@ -3053,7 +3053,7 @@ static void clif_cartItems(struct map_session_data *sd, enum inventory_type type if (equip) { itemlist_equip.PacketType = cartlistequipType; itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002 itemlist_equip.invType = type; #endif diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e23822e31..83f0a11e5 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -198,7 +198,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 +209,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 +222,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 +233,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 +246,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 +257,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, @@ -1174,7 +1174,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 +1183,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 +1192,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 +1203,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 +1218,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 +1227,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]; |