summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-06 21:56:40 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:20 +0300
commit4635a32afe097f84b541d0d7980a5f607130d00c (patch)
tree019876666af2d629e71f5cc47cd4f6de93af4a22 /src/map
parent9cada287c3d2f4ddfb83da8e37c725212fd9bbf9 (diff)
downloadhercules-4635a32afe097f84b541d0d7980a5f607130d00c.tar.gz
hercules-4635a32afe097f84b541d0d7980a5f607130d00c.tar.bz2
hercules-4635a32afe097f84b541d0d7980a5f607130d00c.tar.xz
hercules-4635a32afe097f84b541d0d7980a5f607130d00c.zip
Update packet ZC_ITEM_PICKUP_PARTY.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c22
-rw-r--r--src/map/packets_struct.h16
2 files changed, 27 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index eda4b933b..03e92340b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17353,22 +17353,22 @@ static void clif_instance_leave(int fd)
static void clif_party_show_picker(struct map_session_data *sd, struct item *item_data)
{
#if PACKETVER >= 20071002
- unsigned char buf[22];
struct item_data* id;
+ struct PACKET_ZC_ITEM_PICKUP_PARTY p;
nullpo_retv(sd);
nullpo_retv(item_data);
id = itemdb->search(item_data->nameid);
- WBUFW(buf,0) = 0x2b8;
- WBUFL(buf,2) = sd->status.account_id;
- WBUFW(buf,6) = item_data->nameid;
- WBUFB(buf,8) = item_data->identify;
- WBUFB(buf,9) = item_data->attribute;
- WBUFB(buf,10) = item_data->refine;
- clif->addcards((struct EQUIPSLOTINFO*)WBUFP(buf, 11), item_data);
- WBUFW(buf,19) = id->equip; // equip location
- WBUFB(buf,21) = itemtype(id->type); // item type
- clif->send(buf, packet_len(0x2b8), &sd->bl, PARTY_SAMEMAP_WOS);
+ p.packetType = 0x2b8;
+ p.AID = sd->status.account_id;
+ p.itemId = item_data->nameid;
+ p.identified = item_data->identify;
+ p.damaged = item_data->attribute;
+ p.refine = item_data->refine;
+ clif->addcards(&p.slot, item_data);
+ p.location = id->equip; // equip location
+ p.itemType = itemtype(id->type); // item type
+ clif->send(&p, sizeof(p), &sd->bl, PARTY_SAMEMAP_WOS);
#endif
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index e5f253718..f3f4d65ef 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -2031,6 +2031,22 @@ struct PACKET_ZC_CASH_ITEM_DELETE {
#endif
} __attribute__((packed));
+struct PACKET_ZC_ITEM_PICKUP_PARTY {
+ int16 packetType;
+ uint32 AID;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint8 identified;
+ uint8 damaged;
+ uint8 refine;
+ struct EQUIPSLOTINFO slot;
+ uint16 location;
+ uint8 itemType;
+} __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