summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/vendinghandler.cpp16
-rw-r--r--src/net/eathena/vendinghandler.h5
3 files changed, 22 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index f10ec6163..61c8661ad 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -536,5 +536,6 @@
#define CMSG_VENDING_CLOSE 0x012e
#define CMSG_VENDING_LIST_REQ 0x0130
#define CMSG_VENDING_BUY 0x0134
+#define CMSG_VENDING_BUY2 0x0801
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index e16e26fd8..e01040055 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -182,4 +182,20 @@ void VendingHandler::buy(const Being *const being,
outMsg.writeInt16(index, "index");
}
+void VendingHandler::buy2(const Being *const being,
+ const int vendId,
+ const int index,
+ const int amount) const
+{
+ if (!being)
+ return;
+
+ createOutPacket(CMSG_VENDING_BUY2);
+ outMsg.writeInt16(16, "len");
+ outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeInt32(vendId, "vend id");
+ outMsg.writeInt16(amount, "amount");
+ outMsg.writeInt16(index, "index");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index ef18f4ce2..e14ca0596 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -45,6 +45,11 @@ class VendingHandler final : public MessageHandler,
const int index,
const int amount) const override final;
+ void buy2(const Being *const being,
+ const int vendId,
+ const int index,
+ const int amount) const override final;
+
protected:
static void processOpenReq(Net::MessageIn &msg);