diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 13:50:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 13:50:36 +0300 |
commit | 29a7ea1d119f87b381dc36c5be3726dbd3fae92d (patch) | |
tree | 3c0b01f33b827b8713935e5e6b1f927b0ea9693a | |
parent | c8f7c0f5b8acdf1b1ecf48501f9468c378486d8c (diff) | |
download | manaplus-29a7ea1d119f87b381dc36c5be3726dbd3fae92d.tar.gz manaplus-29a7ea1d119f87b381dc36c5be3726dbd3fae92d.tar.bz2 manaplus-29a7ea1d119f87b381dc36c5be3726dbd3fae92d.tar.xz manaplus-29a7ea1d119f87b381dc36c5be3726dbd3fae92d.zip |
eathena: add partial support for packet SMSG_VENDING_REPORT 0x0137.
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.h | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 516358fb7..0d3954d7b 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -312,6 +312,7 @@ #define SMSG_VENDING_ITEMS_LIST 0x0800 #define SMSG_VENDING_BUY_ACK 0x0135 #define SMSG_VENDING_OPEN 0x0136 +#define SMSG_VENDING_REPORT 0x0137 #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 8f02e4f72..991bcdf10 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -74,6 +74,10 @@ void VendingHandler::handleMessage(Net::MessageIn &msg) processOpen(msg); break; + case SMSG_VENDING_REPORT: + processReport(msg); + break; + default: break; } @@ -141,4 +145,10 @@ void VendingHandler::processOpen(Net::MessageIn &msg) } } +void VendingHandler::processReport(Net::MessageIn &msg) +{ + msg.readInt16("inv index"); + msg.readInt16("amount"); +} + } // namespace EAthena diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h index d29f355e1..d775f7958 100644 --- a/src/net/eathena/vendinghandler.h +++ b/src/net/eathena/vendinghandler.h @@ -49,6 +49,8 @@ class VendingHandler final : public MessageHandler, static void processBuyAck(Net::MessageIn &msg); static void processOpen(Net::MessageIn &msg); + + static void processReport(Net::MessageIn &msg); }; } // namespace EAthena |