Browse Source

resource dupe

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
b343f4d6d7
  1. 18
      src/engine/objects/CharacterItemManager.java

18
src/engine/objects/CharacterItemManager.java

@ -1254,15 +1254,15 @@ public class CharacterItemManager {
} }
return false; return false;
} }
} else if (i.getItemBase().getType().equals(ItemType.RESOURCE)) { } //else if (i.getItemBase().getType().equals(ItemType.RESOURCE)) {
if(this.inventoryContainsResource(i)){ // if(this.inventoryContainsResource(i)){
Item resource = getResource(i); // Item resource = getResource(i);
if(resource != null){ // if(resource != null){
resource.setNumOfItems(resource.getNumOfItems() + i.getNumOfItems()); // resource.setNumOfItems(resource.getNumOfItems() + i.getNumOfItems());
return true; // return true;
} // }
} //}
} // }
this.inventory.add(i); this.inventory.add(i);
this.itemIDtoType.put(i.getObjectUUID(), i.getObjectType().ordinal()); this.itemIDtoType.put(i.getObjectUUID(), i.getObjectType().ordinal());

Loading…
Cancel
Save