summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-21 00:14:04 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-29 19:46:06 +0300
commit6475f9aaef5e6affe3565c80e416e4b4e9cde043 (patch)
tree88cfc6cc1b27f7c4736927f3d2941439b1707901 /src/map/clif.c
parent887d53cac4391b438f07dccf7e148ff0769f6a55 (diff)
downloadhercules-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.c12
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));