From 9f37c6e32dedd9b91aae09038de5e3fa1ab84513 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Jan 2015 14:42:52 +0300 Subject: eathena: add packet CMSG_VENDING_BUY 0x0134. --- src/net/eathena/vendinghandler.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/net/eathena/vendinghandler.cpp') diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 0b145e3e7..e16e26fd8 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -168,4 +168,18 @@ void VendingHandler::open(const Being *const being) const outMsg.writeInt32(being->getId(), "account id"); } +void VendingHandler::buy(const Being *const being, + const int index, + const int amount) const +{ + if (!being) + return; + + createOutPacket(CMSG_VENDING_BUY); + outMsg.writeInt16(12, "len"); + outMsg.writeInt32(being->getId(), "account id"); + outMsg.writeInt16(amount, "amount"); + outMsg.writeInt16(index, "index"); +} + } // namespace EAthena -- cgit v1.2.3-70-g09d2