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 | |
parent | 951df2174639145fe1498aeba7c490a1453c2f77 (diff) | |
download | mana-client-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.gz mana-client-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.bz2 mana-client-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.tar.xz mana-client-8c3ddf08fa76b5e39c1e3854a1c5fb06029772a2.zip |
Avoid stacking equipment other than arrows. Based on similar fix in inventoryhandler.
Diffstat (limited to 'src')
-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); } |