Examples of destroyItem()


Examples of l2p.gameserver.model.items.PcInventory.destroyItem()

            }
            if(item.isEquipped())
            {
              inv.unEquipItemInSlot(item.getEquipSlot());
            }
            inv.destroyItem(item, count, true);
          }
          else if(id.getId() == L2Item.ITEM_ID_CLAN_REPUTATION_SCORE)
          {
            activeChar.getClan().incReputation((int) -count, false, "MultiSell" + _listId);
            activeChar.sendPacket(new SystemMessage(SystemMessage.S1_POINTS_HAVE_BEEN_DEDUCTED_FROM_THE_CLAN_REPUTATION_SCORE).addNumber(count));
View Full Code Here

Examples of l2p.gameserver.model.items.PcInventory.destroyItem()

      return;
    }
    L2ItemInstance removedScroll, removedCatalyst = null;
    synchronized(inventory)
    {
      removedScroll = inventory.destroyItem(scroll.getObjectId(), 1, true);
      if(catalyst != null)
      {
        removedCatalyst = inventory.destroyItem(catalyst.getObjectId(), 1, true);
      }
    }
View Full Code Here

Examples of l2p.gameserver.model.items.PcInventory.destroyItem()

    synchronized(inventory)
    {
      removedScroll = inventory.destroyItem(scroll.getObjectId(), 1, true);
      if(catalyst != null)
      {
        removedCatalyst = inventory.destroyItem(catalyst.getObjectId(), 1, true);
      }
    }
    //tries enchant without scrolls
    if(removedScroll == null || catalyst != null && removedCatalyst == null)
    {
View Full Code Here

Examples of l2p.gameserver.model.items.PcInventory.destroyItem()

      {
        if(itemToEnchant.isEquipped())
        {
          inventory.unEquipItemInSlot(itemToEnchant.getEquipSlot());
        }
        L2ItemInstance destroyedItem = inventory.destroyItem(itemToEnchant.getObjectId(), 1, true);
        if(destroyedItem == null)
        {
          _log.warning("failed to destroy " + itemToEnchant.getObjectId() + " after unsuccessful enchant attempt by char " + activeChar.getName());
          activeChar.sendActionFailed();
          return;
View Full Code Here

Examples of l2p.gameserver.model.items.PcInventory.destroyItem()

    }
    Log.add(activeChar.getName() + "|Trying to attribute enchant|" + itemToEnchant.getItemId() + "|attribute:" + stone.getEnchantAttributeStoneElement(itemType2 == L2Item.TYPE2_SHIELD_ARMOR) + "|" + itemToEnchant.getObjectId(), "enchants");
    L2ItemInstance removedStone;
    synchronized(inventory)
    {
      removedStone = inventory.destroyItem(stone.getObjectId(), 1, true);
    }
    if(removedStone == null)
    {
      activeChar.sendActionFailed();
      return;
View Full Code Here

Examples of lineage2.gameserver.model.items.PcInventory.destroyItem()

            activeChar.setFame(activeChar.getFame() - (int) count, "MultiSell");
            activeChar.sendPacket(new SystemMessage(SystemMessage.S2_S1_HAS_DISAPPEARED).addNumber(count).addString("Fame"));
          }
          else
          {
            if (inventory.destroyItem(id.getItem(), count))
            {
              if (keepenchant && id.getItem().canBeEnchanted())
              {
                enchantLevel = id.getItem().getEnchantLevel();
                attributes = id.getItem().getAttributes();
View Full Code Here

Examples of lineage2.gameserver.model.items.PcInventory.destroyItem()

        return;
      }

      if(appearanceStone.getType() == ShapeType.NORMAL)
      {
        if(!inventory.destroyItem(extracItem, 1L))
        {
          player.sendPacket(ExShapeShiftingResult.FAIL);
          player.setAppearanceStone(null);
          player.setAppearanceExtractItem(null);
          return;
View Full Code Here

Examples of lineage2.gameserver.model.items.PcInventory.destroyItem()

          player.setAppearanceExtractItem(null);
          return;
        }
      }

      inventory.destroyItem(stone, 1L);
      player.reduceAdena(cost);

      boolean equipped = false;
      if(equipped = targetItem.isEquipped())
      {
View Full Code Here

Examples of lineage2.gameserver.model.items.PcInventory.destroyItem()

    if (itemToEnchant.getOwnerId() != activeChar.getObjectId())
    {
      activeChar.sendPacket(Msg.INAPPROPRIATE_ENCHANT_CONDITIONS, ActionFail.STATIC);
      return;
    }
    if (!inventory.destroyItem(stone, 1L))
    {
      activeChar.sendActionFailed();
      return;
    }
    if (Rnd.chance(asi.getChance()))
View Full Code Here

Examples of lineage2.gameserver.model.items.PcInventory.destroyItem()

          player.sendPacket(SystemMsg.DOES_NOT_FIT_STRENGTHENING_CONDITIONS_OF_THE_SCROLL);
          player.sendActionFailed();
          return;
        }
      }
      if ((!inventory.destroyItem(scroll, 1)) || ((catalyst != null) && (!inventory.destroyItem(catalyst, 1))))
      {
        player.sendPacket(EnchantResult.CANCEL);
        player.sendActionFailed();
        return;
      }
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.