if (item.amount < amount) {
amount = item.amount;
}
InvItem newItem;
int exp;
ItemDartTipDef tipDef = null;
if (item.id == 280) {
newItem = new InvItem(637, amount);
exp = amount;
} else if ((tipDef = EntityHandler.getItemDartTipDef(item.id)) != null) {
newItem = new InvItem(tipDef.getDartID(), amount);
exp = (int) (tipDef.getExp() * (double) amount);
} else {
return false;
}
final int amt = amount;
final int xp = exp;