From 7976202af5db10450d111d7e204b68bb40c1a489 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 Sep 2014 16:48:18 +0300 Subject: add packet comments in buysellhandler. --- src/net/ea/buysellhandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index e9c34ac7d..0e3687aa3 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -135,14 +135,14 @@ void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg) { if (!BuySellDialog::isActive()) { - mNpcId = msg.readInt32(); + mNpcId = msg.readInt32("npc id"); new BuySellDialog(mNpcId); } } void BuySellHandler::processNpcSell(Net::MessageIn &msg) const { - msg.readInt16(); // length + msg.readInt16("len"); const int n_items = (msg.getLength() - 4) / 10; if (n_items > 0) { @@ -151,9 +151,9 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg) const for (int k = 0; k < n_items; k++) { - const int index = msg.readInt16() - INVENTORY_OFFSET; - const int value = msg.readInt32(); - msg.readInt32(); // value + const int index = msg.readInt16("index") - INVENTORY_OFFSET; + const int value = msg.readInt32("value"); + msg.readInt32("value?"); const Item *const item = PlayerInfo::getInventory() ->getItem(index); @@ -170,7 +170,7 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg) const void BuySellHandler::processNpcBuyResponse(Net::MessageIn &msg) const { - if (msg.readUInt8() == 0U) + if (msg.readUInt8("response") == 0U) { NotifyManager::notify(NotifyTypes::BUY_DONE); } -- cgit v1.2.3-70-g09d2