summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-07 14:42:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-07 15:26:06 +0300
commit9f37c6e32dedd9b91aae09038de5e3fa1ab84513 (patch)
tree56367610011c7c5fe741b56b5afdb732eb66be62 /src/net/eathena/vendinghandler.cpp
parentf52847a08113f09459d620cc5d91193b38d7a064 (diff)
downloadmanaverse-9f37c6e32dedd9b91aae09038de5e3fa1ab84513.tar.gz
manaverse-9f37c6e32dedd9b91aae09038de5e3fa1ab84513.tar.bz2
manaverse-9f37c6e32dedd9b91aae09038de5e3fa1ab84513.tar.xz
manaverse-9f37c6e32dedd9b91aae09038de5e3fa1ab84513.zip
eathena: add packet CMSG_VENDING_BUY 0x0134.
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r--src/net/eathena/vendinghandler.cpp14
1 files changed, 14 insertions, 0 deletions
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