}
boolean equipped = item.isEquipped();
if (equipped)
{
inventory.isRefresh = true;
inventory.unEquipItem(item);
}
int safeEnchantLevel = item.getTemplate().getBodyPart() == 32768 ? (esi.getSafe() + 1) : esi.getSafe();
int chance = esi.getChance();
if (catalyst != null)
{