From 8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Fri, 25 Apr 2008 23:55:51 +0000 Subject: Avoid stacking equipment other than arrows. Based on similar fix in inventoryhandler. --- src/inventory.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2