|
|
|
@ -1254,16 +1254,16 @@ public class CharacterItemManager {
@@ -1254,16 +1254,16 @@ 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()); |
|
|
|
|
return true; |
|
|
|
|