diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-06-21 00:14:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-06-29 19:46:06 +0300 |
commit | 6475f9aaef5e6affe3565c80e416e4b4e9cde043 (patch) | |
tree | 88cfc6cc1b27f7c4736927f3d2941439b1707901 /src/map/clif.c | |
parent | 887d53cac4391b438f07dccf7e148ff0769f6a55 (diff) | |
download | hercules-6475f9aaef5e6affe3565c80e416e4b4e9cde043.tar.gz hercules-6475f9aaef5e6affe3565c80e416e4b4e9cde043.tar.bz2 hercules-6475f9aaef5e6affe3565c80e416e4b4e9cde043.tar.xz hercules-6475f9aaef5e6affe3565c80e416e4b4e9cde043.zip |
Fix packet 836 (search in stores).
Added item options fields into this packet.
Updated other things for support for report item options in vending.
Buying store not supported for now.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index ce963f5ae..23eb3ee52 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17760,7 +17760,11 @@ void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) { /// 1 = "next" label to retrieve more results void clif_search_store_info_ack(struct map_session_data* sd) { - const unsigned int blocksize = MESSAGE_SIZE+26; +#if PACKETVER >= 20150226 + const unsigned int blocksize = MESSAGE_SIZE + 26 + 5 * MAX_ITEM_OPTIONS; +#else + const unsigned int blocksize = MESSAGE_SIZE + 26; +#endif int fd; unsigned int i, start, end; @@ -17795,7 +17799,11 @@ void clif_search_store_info_ack(struct map_session_data* sd) it.nameid = ssitem->nameid; it.amount = ssitem->amount; - clif->addcards(WFIFOP(fd,i*blocksize+25+MESSAGE_SIZE), &it); + clif->addcards(WFIFOP(fd, i * blocksize + 25 + MESSAGE_SIZE), &it); +#if PACKETVER >= 20150226 + memcpy(&it.option, &ssitem->option, sizeof(it.option)); + clif->add_item_options(WFIFOP(fd, i * blocksize + 33 + MESSAGE_SIZE), &it); +#endif } WFIFOSET(fd,WFIFOW(fd,2)); |