Browse Source

resource dupe

lakebane-master
FatBoy-DOTC 8 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 { @@ -1254,15 +1254,15 @@ public class CharacterItemManager {
}
return false;
}
} else if (i.getItemBase().getType().equals(ItemType.RESOURCE)) {
if(this.inventoryContainsResource(i)){
Item resource = getResource(i);
if(resource != null){
resource.setNumOfItems(resource.getNumOfItems() + i.getNumOfItems());
return true;
}
}
}
} //else if (i.getItemBase().getType().equals(ItemType.RESOURCE)) {
// if(this.inventoryContainsResource(i)){
// Item resource = getResource(i);
// if(resource != null){
// resource.setNumOfItems(resource.getNumOfItems() + i.getNumOfItems());
// return true;
// }
//}
// }
this.inventory.add(i);
this.itemIDtoType.put(i.getObjectUUID(), i.getObjectType().ordinal());

Loading…
Cancel
Save