summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-14 20:54:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-25 01:43:47 +0300
commite165af7fb85e58684e43c444ca9b086fe159432a (patch)
treefaae5a7437d917664e3322f0e4bb22ff57a902e3 /src/map
parentf27534cfec882e5e079dc52d7d498ec04648de60 (diff)
downloadhercules-e165af7fb85e58684e43c444ca9b086fe159432a.tar.gz
hercules-e165af7fb85e58684e43c444ca9b086fe159432a.tar.bz2
hercules-e165af7fb85e58684e43c444ca9b086fe159432a.tar.xz
hercules-e165af7fb85e58684e43c444ca9b086fe159432a.zip
Add packet 0x0a37 ZC_ITEM_PICKUP_ACK_V7 based on rathena commit:
commit 9716233c842f731df3fed5281370e324b5f5f024 Author: Lemongrass3110 <lemongrass@kstp.at> 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/packets_struct.h8
2 files changed, 14 insertions, 2 deletions
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 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK3)
/// 0990 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V5)
/// 0a0c <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V6)
-void clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
+/// 0a37 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W <favorite>.B <view id>.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);
@@ -2483,6 +2485,10 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
#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 {