summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.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/inventoryhandler.cpp
parent037248d338291529e0c044a80ca8345abe05dd2b (diff)
downloadmanaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.gz
manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.bz2
manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.xz
manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.zip
Implement receiving item color from server.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 9828fb957..340f0c4b2 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -223,7 +223,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
else
{
mInventoryItems.push_back(InventoryItem(index, itemId,
- amount, 0, false));
+ amount, 0, identified, false));
}
}
break;
@@ -256,7 +256,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
}
mInventoryItems.push_back(InventoryItem(index, itemId, amount,
- refine, false));
+ refine, identified, false));
}
break;
@@ -381,7 +381,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
for (; it != it_end; ++it)
{
mStorage->setItem((*it).slot, (*it).id, (*it).quantity,
- (*it).equip);
+ (*it).refine, (*it).color, (*it).equip);
}
mInventoryItems.clear();
@@ -403,13 +403,16 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
if (Item *item = mStorage->getItem(index))
{
- item->setId(itemId);
+ item->setId(itemId, identified);
item->increaseQuantity(amount);
}
else
{
if (mStorage)
- mStorage->setItem(index, itemId, amount, false);
+ {
+ mStorage->setItem(index, itemId, amount, refine,
+ identified, false);
+ }
}
break;