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 | |
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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/inventory.cpp | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2008-04-26 Dennis Friis <peavey@placid.dk> + + * src/inventory.cpp: Avoid stacking equipment other than arrows. Based on + similar fix in inventoryhandler. + 2008-04-24 Dennis Friis <peavey@placid.dk> * src/itemshortcut.h, src/gui/itemshortcutcontainer.cpp, 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); } |