Examples of ExBaseAttributeCancelResult


Examples of lineage2.gameserver.network.serverpackets.ExBaseAttributeCancelResult

    }
    ItemAttributes set = itemToUnnchant.getAttributes();
    Element element = Element.getElementById(_attributeId);
    if ((element == Element.NONE) || (set.getValue(element) <= 0))
    {
      activeChar.sendPacket(new ExBaseAttributeCancelResult(false, itemToUnnchant, element), ActionFail.STATIC);
      return;
    }
    if (!activeChar.reduceAdena(ExShowBaseAttributeCancelWindow.getAttributeRemovePrice(itemToUnnchant), true))
    {
      activeChar.sendPacket(new ExBaseAttributeCancelResult(false, itemToUnnchant, element), SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_ADENA, ActionFail.STATIC);
      return;
    }
    boolean equipped = itemToUnnchant.isEquipped();
    if (equipped)
    {
      activeChar.getInventory().unEquipItem(itemToUnnchant);
    }
    itemToUnnchant.setAttributeElement(element, 0);
    itemToUnnchant.setJdbcState(JdbcEntityState.UPDATED);
    itemToUnnchant.update();
    if (equipped)
    {
      activeChar.getInventory().equipItem(itemToUnnchant);
    }
    activeChar.sendPacket(new InventoryUpdate().addModifiedItem(itemToUnnchant));
    activeChar.sendPacket(new ExBaseAttributeCancelResult(true, itemToUnnchant, element));
    activeChar.updateStats();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.