summaryrefslogtreecommitdiff
path: root/src/net/eathena/markethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-22 02:26:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-22 02:26:54 +0300
commitb3f39e67e4bf45f526a6a1867e72e2b35092528b (patch)
tree4213a0f9135729ce13bc93591543cf140d5a76e9 /src/net/eathena/markethandler.cpp
parent4482f516b5bd6677b5eb045bdc624f50a6ac6313 (diff)
downloadplus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.gz
plus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.bz2
plus-b3f39e67e4bf45f526a6a1867e72e2b35092528b.tar.xz
plus-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.cpp16
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);