diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
commit | de51eaa43e05c2126fc1eef2a7e115843f972547 (patch) | |
tree | 286a05a069e048247f90c7595f1b8939be784608 /src/net/tmwa/tradehandler.cpp | |
parent | d4c08d3bf69410a35a50875de50cc6fe74b3bf3e (diff) | |
parent | 8627c7745f47492ab349da6a74e98e3d5813418f (diff) | |
download | mv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.gz mv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.bz2 mv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.xz mv-de51eaa43e05c2126fc1eef2a7e115843f972547.zip |
Merge branch 'coloritems'
Diffstat (limited to 'src/net/tmwa/tradehandler.cpp')
-rw-r--r-- | src/net/tmwa/tradehandler.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 3fb05399d..815c8f54d 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -193,18 +193,23 @@ void TradeHandler::handleMessage(Net::MessageIn &msg) { int amount = msg.readInt32(); int type = msg.readInt16(); - msg.readInt8(); // identified flag + int identify = msg.readInt8(); // identified flag msg.readInt8(); // attribute - msg.readInt8(); // refine + int refine = msg.readInt8(); // refine msg.skip(8); // card (4 shorts) // TODO: handle also identified, etc if (tradeWindow) { if (type == 0) + { tradeWindow->setMoney(amount); + } else - tradeWindow->addItem(type, false, amount, false); + { + tradeWindow->addItem(type, false, amount, refine, + identify, false); + } } } break; @@ -233,7 +238,8 @@ void TradeHandler::handleMessage(Net::MessageIn &msg) if (tradeWindow) { tradeWindow->addItem(item->getId(), true, quantity, - item->isEquipment()); + item->getRefine(), item->getColor(), + item->isEquipment()); } item->increaseQuantity(-quantity); break; |