summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-21 21:10:13 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-21 21:10:13 -0600
commit95fc361288426b819338f1743e67e05c7882fc73 (patch)
tree45221eefba3bbcaa5ad15b67fca9e8cec03225b2
parent4cc7305cfa08598398123641987cf1fdf2bd7616 (diff)
downloadmana-client-95fc361288426b819338f1743e67e05c7882fc73.tar.gz
mana-client-95fc361288426b819338f1743e67e05c7882fc73.tar.bz2
mana-client-95fc361288426b819338f1743e67e05c7882fc73.tar.xz
mana-client-95fc361288426b819338f1743e67e05c7882fc73.zip
Fix handling of odd equipable items
-rw-r--r--src/inventory.cpp1
-rw-r--r--src/net/ea/inventoryhandler.cpp7
2 files changed, 2 insertions, 6 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 532d9ab6..4f0a6860 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -91,6 +91,7 @@ void Inventory::setItem(int index, int id, int quantity, bool equipment)
Item *item = new Item(id, quantity, equipment);
item->setInvIndex(index);
mItems[index] = item;
+ mItems[index]->setEquipment(equipment);
}
else if (id > 0)
{
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 112d8371..172e3e95 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -190,12 +190,7 @@ void InventoryHandler::handleMessage(MessageIn &msg)
{
player_node->pickedUp(itemInfo, amount);
- if (Item *item = inventory->getItem(index)) {
- item->setId(itemId);
- item->increaseQuantity(amount);
- } else {
- inventory->setItem(index, itemId, amount, equipType != 0);
- }
+ inventory->setItem(index, itemId, amount, equipType != 0);
}
} break;