if(itemToEnchant.getAttributeElementValue() == 0 && itemType2 == L2Item.TYPE2_WEAPON)
{
value = 20;
}
itemToEnchant.setAttributeElement(stone.getEnchantAttributeStoneElement(itemType2 == L2Item.TYPE2_SHIELD_ARMOR), itemToEnchant.getAttributeElementValue() + value, true);
inventory.refreshListeners();
activeChar.sendPacket(new InventoryUpdate().addModifiedItem(itemToEnchant));
Log.add(activeChar.getName() + "|Successfully enchanted by attribute|" + itemToEnchant.getItemId() + "|to+" + itemToEnchant.getAttributeElementValue() + "|" + (stone.isAttributeCrystal() ? Config.ENCHANT_ATTRIBUTE_CRYSTAL_CHANCE : Config.ENCHANT_ATTRIBUTE_STONE_CHANCE), "enchants");
Log.LogItem(activeChar, Log.EnchantItem, itemToEnchant);
}
else