diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-02 16:48:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:55 +0300 |
commit | 7976202af5db10450d111d7e204b68bb40c1a489 (patch) | |
tree | eb9a888287009613c2e98b9da29f5d3d7d165294 /src/net/ea/buysellhandler.cpp | |
parent | 5a033f07aa2242e6b10da1601e7612e05e6d7fa4 (diff) | |
download | plus-7976202af5db10450d111d7e204b68bb40c1a489.tar.gz plus-7976202af5db10450d111d7e204b68bb40c1a489.tar.bz2 plus-7976202af5db10450d111d7e204b68bb40c1a489.tar.xz plus-7976202af5db10450d111d7e204b68bb40c1a489.zip |
add packet comments in buysellhandler.
Diffstat (limited to 'src/net/ea/buysellhandler.cpp')
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); } |