summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-07 14:12:55 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-07 14:12:55 +0300
commitf52847a08113f09459d620cc5d91193b38d7a064 (patch)
tree277e94c02fb0f25f9db64bba18db352919a572b7 /src/net/eathena
parent9d195207af67df767233ff6128f5b1df0421f83e (diff)
downloadplus-f52847a08113f09459d620cc5d91193b38d7a064.tar.gz
plus-f52847a08113f09459d620cc5d91193b38d7a064.tar.bz2
plus-f52847a08113f09459d620cc5d91193b38d7a064.tar.xz
plus-f52847a08113f09459d620cc5d91193b38d7a064.zip
eathena: add packet CMSG_VENDING_LIST_REQ 0x0130.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/vendinghandler.cpp11
-rw-r--r--src/net/eathena/vendinghandler.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index a6f14c109..ff985053b 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -534,5 +534,6 @@
#define CMSG_AUCTION_BUY_SELL 0x025c
#define CMSG_VENDING_CLOSE 0x012e
+#define CMSG_VENDING_LIST_REQ 0x0130
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index dd1d7e7cc..0b145e3e7 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -20,6 +20,8 @@
#include "net/eathena/vendinghandler.h"
+#include "being/being.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -157,4 +159,13 @@ void VendingHandler::close() const
createOutPacket(CMSG_VENDING_CLOSE);
}
+void VendingHandler::open(const Being *const being) const
+{
+ if (!being)
+ return;
+
+ createOutPacket(CMSG_VENDING_LIST_REQ);
+ outMsg.writeInt32(being->getId(), "account id");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index cf451e8fa..7e0bb8368 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -39,6 +39,8 @@ class VendingHandler final : public MessageHandler,
void close() const override final;
+ void open(const Being *const being) const override final;
+
protected:
static void processOpenReq(Net::MessageIn &msg);