summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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