summaryrefslogtreecommitdiff
path: root/src/net/tmwa/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-27 03:36:52 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-27 03:36:52 +0200
commit1b57518ca97c670174f89c5af28659b6ad0c3d42 (patch)
tree369c6e2f8cfbd791f252de68c0f85bd1af47c351 /src/net/tmwa/tradehandler.cpp
parent037248d338291529e0c044a80ca8345abe05dd2b (diff)
downloadplus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.gz
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.bz2
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.xz
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.zip
Implement receiving item color from server.
Diffstat (limited to 'src/net/tmwa/tradehandler.cpp')
-rw-r--r--src/net/tmwa/tradehandler.cpp14
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;