diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-22 02:26:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-22 02:26:54 +0300 |
commit | b3f39e67e4bf45f526a6a1867e72e2b35092528b (patch) | |
tree | 4213a0f9135729ce13bc93591543cf140d5a76e9 /src/net/eathena/markethandler.cpp | |
parent | 4482f516b5bd6677b5eb045bdc624f50a6ac6313 (diff) | |
download | manaplus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.gz manaplus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.bz2 manaplus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.xz manaplus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.zip |
eathena: add partial support for packet SMSG_NPC_MARKET_BUY_ACK 0x09d7.
Diffstat (limited to 'src/net/eathena/markethandler.cpp')
-rw-r--r-- | src/net/eathena/markethandler.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 4631abf03..da3180f90 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -36,6 +36,7 @@ MarketHandler::MarketHandler() : static const uint16_t _messages[] = { SMSG_NPC_MARKET_OPEN, + SMSG_NPC_MARKET_BUY_ACK, 0 }; handledMessages = _messages; @@ -50,6 +51,10 @@ void MarketHandler::handleMessage(Net::MessageIn &msg) processMarketOpen(msg); break; + case SMSG_NPC_MARKET_BUY_ACK: + processMarketBuyAck(msg); + break; + default: break; } @@ -68,6 +73,17 @@ void MarketHandler::processMarketOpen(Net::MessageIn &msg) } } +void MarketHandler::processMarketBuyAck(Net::MessageIn &msg) +{ + const int len = (msg.readInt16("len") - 4) / 8; + for (int f = 0; f < len; f ++) + { + msg.readInt16("item id"); + msg.readInt16("amount"); + msg.readInt32("price"); + } +} + void MarketHandler::close() { createOutPacket(CMSG_NPC_MARKET_CLOSE); |