diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inventory.cpp | 1 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 7 |
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; |