diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 12:10:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 12:10:11 +0300 |
commit | 8ea8b75484d4896e31a27975311e51455bb00150 (patch) | |
tree | 3fe04e84f011027216c2be1c7637feccd1e0d8c9 /src | |
parent | 291f73098e52742bed3f4c4271524e347ee317e1 (diff) | |
download | manaverse-8ea8b75484d4896e31a27975311e51455bb00150.tar.gz manaverse-8ea8b75484d4896e31a27975311e51455bb00150.tar.bz2 manaverse-8ea8b75484d4896e31a27975311e51455bb00150.tar.xz manaverse-8ea8b75484d4896e31a27975311e51455bb00150.zip |
eathena: add partial support for packet SMSG_VENDING_OPEN_REQ 0x012d.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/protocol.h | 2 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.h | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 8e37d376f..af63e4ea9 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -306,6 +306,8 @@ #define SMSG_AUCTION_MESSAGE 0x0250 #define SMSG_AUCTION_CLOSE 0x025d +#define SMSG_VENDING_OPEN_REQ 0x012d + #define SMSG_ELEMENTAL_UPDATE_STATUS 0x081e #define SMSG_ELEMENTAL_INFO 0x081d diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index ea9ddeda6..d38f2d102 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -34,6 +34,7 @@ VendingHandler::VendingHandler() : { static const uint16_t _messages[] = { + SMSG_VENDING_OPEN_REQ, 0 }; handledMessages = _messages; @@ -44,9 +45,18 @@ void VendingHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { + case SMSG_VENDING_OPEN_REQ: + processOpenReq(msg); + break; + default: break; } } +void VendingHandler::processOpenReq(Net::MessageIn &msg) +{ + msg.readInt16("slots allowed"); +} + } // namespace EAthena diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h index 46eac0ed9..fbd9b4481 100644 --- a/src/net/eathena/vendinghandler.h +++ b/src/net/eathena/vendinghandler.h @@ -36,6 +36,9 @@ class VendingHandler final : public MessageHandler, A_DELETE_COPY(VendingHandler) void handleMessage(Net::MessageIn &msg) override final; + + protected: + static void processOpenReq(Net::MessageIn &msg); }; } // namespace EAthena |