|
|
@ -1262,12 +1262,13 @@ public class CharacterItemManager { |
|
|
|
if(item.getItemBaseID() == i.getItemBaseID()){ |
|
|
|
if(item.getItemBaseID() == i.getItemBaseID()){ |
|
|
|
if(item.getNumOfItems() + count <= Warehouse.getMaxResources().get(i.getItemBaseID())){ |
|
|
|
if(item.getNumOfItems() + count <= Warehouse.getMaxResources().get(i.getItemBaseID())){ |
|
|
|
purge.add(item); |
|
|
|
purge.add(item); |
|
|
|
count += item.getNumOfItems(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for(Item item : purge){ |
|
|
|
for(Item item : purge){ |
|
|
|
|
|
|
|
count += item.getNumOfItems(); |
|
|
|
this.removeItemFromInventory(item); |
|
|
|
this.removeItemFromInventory(item); |
|
|
|
|
|
|
|
item.junk(); |
|
|
|
} |
|
|
|
} |
|
|
|
Item resource = new MobLoot(this.getOwner(),i.getItemBase(),count,false).promoteToItem((PlayerCharacter)this.getOwner()); |
|
|
|
Item resource = new MobLoot(this.getOwner(),i.getItemBase(),count,false).promoteToItem((PlayerCharacter)this.getOwner()); |
|
|
|
this.inventory.add(resource); |
|
|
|
this.inventory.add(resource); |
|
|
|