From 727fca1c7d4132c7c15120be17765432ecdfb262 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 7 Jul 2018 22:42:18 +0300 Subject: Update packet CZ_SSILIST_ITEM_CLICK. --- src/map/clif.c | 11 ++--------- src/map/packets_struct.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index db3d4beef..697faaa03 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18082,15 +18082,8 @@ static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_d /// 083c .L .L .W static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data *sd) { - unsigned short nameid; - int account_id, store_id; - struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; - - account_id = RFIFOL(fd,info->pos[0]); - store_id = RFIFOL(fd,info->pos[1]); - nameid = RFIFOW(fd,info->pos[2]); - - searchstore->click(sd, account_id, store_id, nameid); + const struct PACKET_CZ_SSILIST_ITEM_CLICK *p = RFIFOP(fd, 0); + searchstore->click(sd, p->AID, p->storeId, p->itemId); } /// Notification of the store position on current map (ZC_SSILIST_ITEM_CLICK_ACK). diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 29b1de679..1114ef9c1 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -2169,6 +2169,18 @@ struct PACKET_CZ_REQ_MAKINGITEM { uint16 itemId; #endif } __attribute__((packed)); + +struct PACKET_CZ_SSILIST_ITEM_CLICK { + int16 packetType; + uint32 AID; + uint32 storeId; +#if PACKETVER_RE_NUM >= 20180704 + uint32 itemId; +#else + uint16 itemId; +#endif +} __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 -- cgit v1.2.3-70-g09d2