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