diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 13:03:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 13:03:33 +0300 |
commit | a39151db799a49eac2ae0588f99a6cad23b914c3 (patch) | |
tree | c15466d50006890bc21fb2941ad217872c55f7fc /src/net/eathena/vendinghandler.cpp | |
parent | f8bfed03f76e377bd036d502663f3b9d3268a4a5 (diff) | |
download | plus-a39151db799a49eac2ae0588f99a6cad23b914c3.tar.gz plus-a39151db799a49eac2ae0588f99a6cad23b914c3.tar.bz2 plus-a39151db799a49eac2ae0588f99a6cad23b914c3.tar.xz plus-a39151db799a49eac2ae0588f99a6cad23b914c3.zip |
eathena: add partial support for packet SMSG_VENDING_ITEMS_LIST 0x0800.
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 8a1dd2ba8..10ced1a07 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -37,6 +37,7 @@ VendingHandler::VendingHandler() : SMSG_VENDING_OPEN_REQ, SMSG_VENDING_SHOW_BOARD, SMSG_VENDING_HIDE_BOARD, + SMSG_VENDING_ITEMS_LIST, 0 }; handledMessages = _messages; @@ -59,6 +60,10 @@ void VendingHandler::handleMessage(Net::MessageIn &msg) processHideBoard(msg); break; + case SMSG_VENDING_ITEMS_LIST: + processItemsList(msg); + break; + default: break; } @@ -80,4 +85,22 @@ void VendingHandler::processHideBoard(Net::MessageIn &msg) msg.readInt32("owner id"); } +void VendingHandler::processItemsList(Net::MessageIn &msg) +{ + const int count = (msg.readInt16("len") - 12) / 22; + msg.readInt32("id"); + msg.readInt32("vender id"); + for (int f = 0; f < count; f ++) + { + msg.readInt32("price"); + msg.readInt16("amount"); + msg.readInt16("inv index"); + msg.readUInt8("item type"); + msg.readInt16("item id"); + msg.readUInt8("identify"); + msg.readUInt8("attribute"); + msg.readUInt8("refine"); + } +} + } // namespace EAthena |