From e165af7fb85e58684e43c444ca9b086fe159432a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Jun 2017 20:54:20 +0300 Subject: Add packet 0x0a37 ZC_ITEM_PICKUP_ACK_V7 based on rathena commit: commit 9716233c842f731df3fed5281370e324b5f5f024 Author: Lemongrass3110 Date: Mon May 8 23:40:05 2017 +0200 Introducing the equip preview window Fixes some bugs for 2016-09-21 onward, where you can preview how a item would like if you put it on. This works on other people's vending and on your own inventory. Thanks to @Rytech2 and @hazimjauhari90 --- src/map/clif.c | 8 +++++++- src/map/packets_struct.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index 524378439..7721c4644 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2442,7 +2442,9 @@ void clif_addcards2(unsigned short *cards, struct item* item) { /// 02d4 .W .W .W .B .B .B .W .W .W .W .W .B .B .L .W (ZC_ITEM_PICKUP_ACK3) /// 0990 .W .W .W .B .B .B .W .W .W .W .L .B .B .L .W (ZC_ITEM_PICKUP_ACK_V5) /// 0a0c .W .W .W .B .B .B .W .W .W .W .L .B .B .L .W (ZC_ITEM_PICKUP_ACK_V6) -void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { +/// 0a37 .W .W .W .B .B .B .W .W .W .W .L .B .B .L .W .B .W (ZC_ITEM_PICKUP_ACK_V7) +void clif_additem(struct map_session_data *sd, int n, int amount, int fail) +{ struct packet_additem p; nullpo_retv(sd); @@ -2482,6 +2484,10 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { #endif #if PACKETVER >= 20150226 clif->add_item_options(&p.option_data[0], &sd->status.inventory[n]); +#endif +#if PACKETVER >= 20160921 + p.favorite = sd->status.inventory[n].favorite; + p.look = sd->inventory_data[n]->look; #endif } p.result = (unsigned char)fail; diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 0bd85db7f..796ea577c 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, @@ -448,6 +450,10 @@ struct packet_additem { #if PACKETVER >= 20150226 struct ItemOptions option_data[MAX_ITEM_OPTIONS]; #endif +#if PACKETVER >= 20160921 + uint8 favorite; + uint16 look; +#endif } __attribute__((packed)); struct packet_dropflooritem { -- cgit v1.2.3-70-g09d2