diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-07-23 10:30:32 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-07-23 10:31:36 -0600 |
commit | cc7931166279d2302afdcc1030c3d5b7e104faad (patch) | |
tree | b3d83dce467ccabfdad78eded2a5233f0816a31b /src | |
parent | 01263d9ebb304d9fba90d741bf849e0865e3c17d (diff) | |
download | mana-cc7931166279d2302afdcc1030c3d5b7e104faad.tar.gz mana-cc7931166279d2302afdcc1030c3d5b7e104faad.tar.bz2 mana-cc7931166279d2302afdcc1030c3d5b7e104faad.tar.xz mana-cc7931166279d2302afdcc1030c3d5b7e104faad.zip |
Fix adding to existing item in inventory
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 6ee974fc..b6e91609 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -191,6 +191,11 @@ void InventoryHandler::handleMessage(MessageIn &msg) { player_node->pickedUp(itemInfo, amount); + Item *item = inventory->getItem(index); + + if (item && item->getId() == itemId) + amount += inventory->getItem(index)->getQuantity(); + inventory->setItem(index, itemId, amount, equipType != 0); } } break; |