summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-25 23:55:51 +0000
committerDennis Friis <peavey@placid.dk>2008-04-25 23:55:51 +0000
commit8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2 (patch)
tree0ddeef161c1afab3059814edefea69989e744ff2
parent951df2174639145fe1498aeba7c490a1453c2f77 (diff)
downloadmana-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--ChangeLog5
-rw-r--r--src/inventory.cpp8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a95d377e..6cfedec6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}