summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-27 18:08:34 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-27 23:26:17 +0200
commitdf5c7ae83a80db63ab90142df9e3a93f5ee630d0 (patch)
tree465991eb7785c1d17e1b15f6798efa67951a0c83 /src/net/tmwa/inventoryhandler.cpp
parent41e84157e0eca3a494cd6d44eec96dfbde0f5626 (diff)
downloadplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.gz
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.bz2
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.xz
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.zip
First part of implimintation item colors.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 340f0c4b2..fc32c3ec3 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -217,7 +217,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
if (inventory)
{
inventory->setItem(index, itemId, amount,
- 0, isEquipment);
+ 0, identified, isEquipment);
}
}
else
@@ -300,7 +300,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
amount += inventory->getItem(index)->getQuantity();
inventory->setItem(index, itemId, amount, refine,
- equipType != 0);
+ identified, equipType != 0);
}
}
} break;
@@ -458,19 +458,29 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
{
index = msg.readInt16() - INVENTORY_OFFSET;
itemId = msg.readInt16();
- msg.readInt8(); // type
- msg.readInt8(); // identify flag
+ if (itemId == 1172)
+ logger->log("step1");
+ int itemType = msg.readInt8(); // type
+ identified = msg.readInt8(); // identify flag
msg.readInt16(); // equip type
equipType = msg.readInt16();
msg.readInt8(); // attribute
refine = msg.readInt8();
msg.skip(8); // card
+ if (itemId == 1172)
+ logger->log("step2");
if (inventory)
- inventory->setItem(index, itemId, 1, refine, true);
+ inventory->setItem(index, itemId, 1, refine, identified, true);
if (equipType)
mEquips.setEquipment(getSlot(equipType), index);
+
+ if (debugInventory)
+ {
+ logger->log("Index: %d, ID: %d, Type: %d, Identified: %d",
+ index, itemId, itemType, identified);
+ }
}
break;