ItemInstance harvest;
if (!player.getInventory().validateCapacity(item.itemId, item.count) || !player.getInventory().validateWeight(item.itemId, item.count))
{
harvest = ItemFunctions.createItem(item.itemId);
harvest.setCount(item.count);
harvest.dropToTheGround(player, monster);
continue;
}
player.getInventory().addItem(item.itemId, item.count);
player.sendPacket(new SystemMessage(SystemMessage.S1_HARVESTED_S3_S2_S).addName(player).addNumber(item.count).addItemName(item.itemId));
if (player.isInParty())