Package lineage2.gameserver.model.items

Examples of lineage2.gameserver.model.items.Inventory$ItemOrderComparator


   * @param player Player
   * @return boolean
   */
  public boolean containAll(Player player)
  {
    Inventory inv = player.getInventory();
    ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
    ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
    ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
    ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
    int chest = 0;
    int legs = 0;
    int head = 0;
    int gloves = 0;
    int feet = 0;
View Full Code Here


   * @param player Player
   * @return int
   */
  public int getEquipedSetPartsCount(Player player)
  {
    Inventory inv = player.getInventory();
    ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
    ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
    ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
    ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
    int chest = 0;
    int legs = 0;
    int head = 0;
    int gloves = 0;
    int feet = 0;
View Full Code Here

   * @param player Player
   * @return boolean
   */
  public boolean containShield(Player player)
  {
    Inventory inv = player.getInventory();
    ItemInstance shieldItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LHAND);
    if ((shieldItem != null) && _shield.contains(shieldItem.getItemId()))
    {
      return true;
    }
    return false;
View Full Code Here

  {
    if (!containAll(player))
    {
      return false;
    }
    Inventory inv = player.getInventory();
    ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
    ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
    ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
    ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
    if (!_chests.isEmpty() && (chestItem.getEnchantLevel() < 6))
    {
      return false;
    }
    if (!_legs.isEmpty() && (legsItem.getEnchantLevel() < 6))
View Full Code Here

      }
      if (first && (_itemConsume[0] > 0))
      {
        for (int i = 0; i < _itemConsume.length; i++)
        {
          Inventory inv = ((Playable) activeChar).getInventory();
          if (inv == null)
          {
            inv = player.getInventory();
          }
          ItemInstance requiredItems = inv.getItemByItemId(_itemConsumeId[i]);
          if ((requiredItems == null) || (requiredItems.getCount() < _itemConsume[i]))
          {
            if (activeChar == player)
            {
              player.sendPacket(isHandler() ? SystemMsg.INCORRECT_ITEM_COUNT : SystemMsg.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
View Full Code Here

    MultiSellListContainer list = new MultiSellListContainer();
    list.setShowAll(false);
    list.setKeepEnchant(true);
    list.setNoTax(false);
    int entry = 0;
    final Inventory inv = player.getInventory();
    for (final ItemInstance itm : inv.getItems())
    {
      if (itm.canBeCrystallized(player))
      {
        final ItemTemplate crystal = ItemHolder.getInstance().getTemplate(itm.getTemplate().getCrystalType().cry);
        MultiSellEntry possibleEntry = new MultiSellEntry(++entry, crystal.getItemId(), itm.getTemplate().getCrystalCount(), 0);
View Full Code Here

  {
    if (!env.character.isPlayer())
    {
      return false;
    }
    Inventory inv = ((Player) env.character).getInventory();
    ItemInstance item = inv.getPaperdollItem(_slot);
    if (item == null)
    {
      return _itemId == 0;
    }
    return (item.getItemId() == _itemId) && (item.getEnchantLevel() >= _enchantLevel);
View Full Code Here

      Player player = cha.getPlayer();
     
      QuestState qs = player.getQuestState(_10301_ShadowOfTerrorBlackishRedFog.class);
      if(qs != null && qs.getCond() == 3 && player.getVar("instance10301") == null)
      {
        Quest q = QuestManager.getQuest(10301);
        player.processQuestEvent(q.getName(), "enterInstance", null);
        //player.setVar("instance10301", "true", -1);
        return;
      }
      if (!player.getVarB("@25_20_telzone_to_magmeld"))
      {
View Full Code Here

    {
      htmltext = "32640-10.htm";
    }
    else if (id == CREATED)
    {
      QuestState ImTheOnlyOneYouCanTrust = st.getPlayer().getQuestState(_240_ImTheOnlyOneYouCanTrust.class);
      if ((st.getPlayer().getLevel() >= 81) && (ImTheOnlyOneYouCanTrust != null) && ImTheOnlyOneYouCanTrust.isCompleted())
      {
        htmltext = "32640-1.htm";
      }
      else
      {
View Full Code Here

      {
        return;
      }
      Player player = cha.getPlayer();
     
      QuestState qs = player.getQuestState(_10301_ShadowOfTerrorBlackishRedFog.class);
      if(qs != null && qs.getCond() == 3 && player.getVar("instance10301") == null)
      {
        Quest q = QuestManager.getQuest(10301);
        player.processQuestEvent(q.getName(), "enterInstance", null);
        //player.setVar("instance10301", "true", -1);
        return;
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.items.Inventory$ItemOrderComparator

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.