diff options
author | Dennis Friis <peavey@placid.dk> | 2008-04-25 23:55:51 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-04-25 23:55:51 +0000 |
commit | 8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2 (patch) | |
tree | 0ddeef161c1afab3059814edefea69989e744ff2 /src/inventory.cpp | |
parent | 951df2174639145fe1498aeba7c490a1453c2f77 (diff) | |
download | mana-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.gz mana-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.bz2 mana-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.xz mana-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.zip |
Avoid stacking equipment other than arrows. Based on similar fix in inventoryhandler.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 6795fbec..be002dfe 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -72,7 +72,13 @@ void Inventory::addItem(int index, int id, int quantity, bool equipment) } mItems[index].setId(id); - mItems[index].increaseQuantity(quantity); + + // Dont stack equipment other than arrows. + if (equipment && !(id == 1199 || id == 529)) + mItems[index].setQuantity(quantity); + else + mItems[index].increaseQuantity(quantity); + mItems[index].setEquipment(equipment); } |