diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-27 03:36:52 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-27 03:36:52 +0200 |
commit | 1b57518ca97c670174f89c5af28659b6ad0c3d42 (patch) | |
tree | 369c6e2f8cfbd791f252de68c0f85bd1af47c351 /src/net/tmwa/inventoryhandler.cpp | |
parent | 037248d338291529e0c044a80ca8345abe05dd2b (diff) | |
download | mv-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.gz mv-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.bz2 mv-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.xz mv-1b57518ca97c670174f89c5af28659b6ad0c3d42.zip |
Implement receiving item color from server.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 13 |
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; |