Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.ExVariationResult


    L2ItemInstance refinerItem = (L2ItemInstance) L2World.getInstance().findObject(_refinerItemObjId);
    L2ItemInstance gemstoneItem = (L2ItemInstance) L2World.getInstance().findObject(_gemstoneItemObjId);
   
    if (targetItem == null || refinerItem == null || gemstoneItem == null || targetItem.getOwnerId() != activeChar.getObjectId() || refinerItem.getOwnerId() != activeChar.getObjectId() || gemstoneItem.getOwnerId() != activeChar.getObjectId() || activeChar.getLevel() < 46) // must be lvl 46
    {
      activeChar.sendPacket(new ExVariationResult(0, 0, 0));
      activeChar.sendPacket(new SystemMessage(SystemMessageId.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS));
      return;
    }
   
    // unequip item
    if (targetItem.isEquipped())
    {
      activeChar.disarmWeapons();
    }
   
    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));
      activeChar.sendPacket(new SystemMessage(SystemMessageId.THE_ITEM_WAS_SUCCESSFULLY_AUGMENTED));
    }
    else
    {
      activeChar.sendPacket(new ExVariationResult(0, 0, 0));
      activeChar.sendPacket(new SystemMessage(SystemMessageId.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS));
    }
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.serverpackets.ExVariationResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.