diff options
-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); } |