diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-07 22:42:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-15 20:36:22 +0300 |
commit | 727fca1c7d4132c7c15120be17765432ecdfb262 (patch) | |
tree | 67a0b116006b0aaa3a3801533de35b3c376c37c8 | |
parent | 6b84a369d9b972ce9719d941bae933f666110e82 (diff) | |
download | hercules-727fca1c7d4132c7c15120be17765432ecdfb262.tar.gz hercules-727fca1c7d4132c7c15120be17765432ecdfb262.tar.bz2 hercules-727fca1c7d4132c7c15120be17765432ecdfb262.tar.xz hercules-727fca1c7d4132c7c15120be17765432ecdfb262.zip |
Update packet CZ_SSILIST_ITEM_CLICK.
-rw-r--r-- | src/map/clif.c | 11 | ||||
-rw-r--r-- | src/map/packets_struct.h | 12 |
2 files changed, 14 insertions, 9 deletions
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 <account id>.L <store id>.L <nameid>.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 |