summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c15
-rw-r--r--src/map/clif.h1
2 files changed, 13 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 53a437d05..6b89985e3 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6625,11 +6625,19 @@ static void clif_openvending(struct map_session_data *sd, int id, struct s_vendi
}
WFIFOSET(fd, len);
+ clif->openvendingAck(fd, 0);
+}
+
+// 0 - open vending success
+// 1 - message MSG_MERCHANTSHOP_MAKING_FAIL
+// 2 - silent ignore
+// 3 - message MSG_ID_C9D (You can not open a stall at the current location)
+static void clif_openvendingAck(int fd, int result)
+{
#if PACKETVER >= 20140625
- /** should go elsewhere perhaps? it has to be bundled with this however. **/
WFIFOHEAD(fd, packet_len(0xa28));
- WFIFOW(fd, 0) = 0xa28;
- WFIFOB(fd, 2) = 0;/** 1 is failure. our current responses to failure are working so not yet implemented **/
+ WFIFOW(fd, 0) = 0xa28; // ZC_ACK_OPENSTORE2
+ WFIFOB(fd, 2) = result;
WFIFOSET(fd, packet_len(0xa28));
#endif
}
@@ -21870,6 +21878,7 @@ void clif_defaults(void)
clif->vendinglist = clif_vendinglist;
clif->buyvending = clif_buyvending;
clif->openvending = clif_openvending;
+ clif->openvendingAck = clif_openvendingAck;
clif->vendingreport = clif_vendingreport;
/* storage handling */
clif->storagelist = clif_storagelist;
diff --git a/src/map/clif.h b/src/map/clif.h
index a60a09852..c58297c5c 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -974,6 +974,7 @@ struct clif_interface {
void (*vendinglist) (struct map_session_data* sd, unsigned int id, struct s_vending* vending_list);
void (*buyvending) (struct map_session_data* sd, int index, int amount, int fail);
void (*openvending) (struct map_session_data* sd, int id, struct s_vending* vending_list);
+ void (*openvendingAck) (int fd, int result);
void (*vendingreport) (struct map_session_data* sd, int index, int amount, uint32 char_id, int zeny);
/* storage handling */
void (*storagelist) (struct map_session_data* sd, struct item* items, int items_length);