summaryrefslogtreecommitdiff
path: root/src/net/eathena/markethandler.cpp
diff options
context:
space:
mode:
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);