summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-02 16:48:18 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:55 +0300
commit7976202af5db10450d111d7e204b68bb40c1a489 (patch)
treeeb9a888287009613c2e98b9da29f5d3d7d165294 /src/net/tmwa/buysellhandler.cpp
parent5a033f07aa2242e6b10da1601e7612e05e6d7fa4 (diff)
downloadmanaplus-7976202af5db10450d111d7e204b68bb40c1a489.tar.gz
manaplus-7976202af5db10450d111d7e204b68bb40c1a489.tar.bz2
manaplus-7976202af5db10450d111d7e204b68bb40c1a489.tar.xz
manaplus-7976202af5db10450d111d7e204b68bb40c1a489.zip
add packet comments in buysellhandler.
Diffstat (limited to 'src/net/tmwa/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 4668c1829..fdb8f86ba 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -94,7 +94,7 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
{
- msg.readInt16(); // length
+ msg.readInt16("len");
unsigned int sz = 11;
if (serverVersion > 0)
sz += 1;
@@ -104,13 +104,13 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
for (unsigned int k = 0; k < n_items; k++)
{
- const int value = msg.readInt32();
- msg.readInt32(); // DCvalue
- msg.readUInt8(); // type
- const int itemId = msg.readInt16();
+ const int value = msg.readInt32("price");
+ msg.readInt32("dc value?");
+ msg.readUInt8("type");
+ const int itemId = msg.readInt16("item id");
uint8_t color = 1;
if (serverVersion > 0)
- color = msg.readUInt8();
+ color = msg.readUInt8("item color");
mBuyDialog->addItem(itemId, color, 0, value);
}
mBuyDialog->sort();
@@ -118,7 +118,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
{
- switch (msg.readUInt8())
+ switch (msg.readUInt8("result"))
{
case 0:
NotifyManager::notify(NotifyTypes::SOLD);