L2ItemInstance targetItem = activeChar.getInventory().getItemByObjectId(_targetItemObjId);
L2ItemInstance refinerItem = activeChar.getInventory().getItemByObjectId(_refinerItemObjId);
L2ItemInstance gemstoneItem = activeChar.getInventory().getItemByObjectId(_gemstoneItemObjId);
if(targetItem == null || refinerItem == null || gemstoneItem == null || targetItem.getOwnerId() != activeChar.getObjectId() || refinerItem.getOwnerId() != activeChar.getObjectId() || gemstoneItem.getOwnerId() != activeChar.getObjectId() || activeChar.getLevel() < 46)
{
activeChar.sendPacket(new ExVariationResult(0, 0, 0), Msg.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS);
return;
}
if(TryAugmentItem(activeChar, targetItem, refinerItem, gemstoneItem))
{
int stat12 = 0x0000FFFF & targetItem.getAugmentation().getAugmentationId();
int stat34 = targetItem.getAugmentation().getAugmentationId() >> 16;
activeChar.sendPacket(new ExVariationResult(stat12, stat34, 1), Msg.THE_ITEM_WAS_SUCCESSFULLY_AUGMENTED);
}
else
{
activeChar.sendPacket(new ExVariationResult(0, 0, 0), Msg.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS);
}
}