Commit ae31e4fd authored by Melledy's avatar Melledy
Browse files

Weapons/artifacts should not have a count of more than 1

parent de75b56d
......@@ -164,6 +164,9 @@ public class Inventory implements Iterable<GameItem> {
if (tab.getSize() >= tab.getMaxCapacity()) {
return null;
}
// Duplicates cause problems
item.setCount(Math.max(item.getCount(), 1));
// Adds to inventory
putItem(item, tab);
} else if (type == ItemType.ITEM_VIRTUAL) {
// Handle
......@@ -288,7 +291,11 @@ public class Inventory implements Iterable<GameItem> {
return false;
}
if (item.getItemData().isEquip()) {
item.setCount(0);
} else {
item.setCount(item.getCount() - count);
}
if (item.getCount() <= 0) {
// Remove from inventory tab too
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment