Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.L2Item


    return _seeds;
  }

  public int getSeedBasicPrice(int seedId)
  {
    L2Item seedItem = ItemTable.getInstance().getTemplate(seedId);
    if(seedItem != null)
    {
      return seedItem.getReferencePrice();
    }
    return 0;
  }
View Full Code Here


    return 0;
  }

  public int getCropBasicPrice(int cropId)
  {
    L2Item cropItem = ItemTable.getInstance().getTemplate(cropId);
    if(cropItem != null)
    {
      return cropItem.getReferencePrice();
    }
    return 0;
  }
View Full Code Here

      long itemPrice = _items[x * 3 + 2];
      if (!ItemTable.getInstance().isExists(itemId) || itemCount < 1 || itemPrice < 0 || itemId == L2Item.ITEM_ID_ADENA)
      {
        continue;
      }
      L2Item item = ItemTable.getInstance().getTemplate(itemId);
      if (item.getReferencePrice() / 2 > itemPrice)
      {
        activeChar.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.SetPrivateStoreBuyList.TooLowPrice", activeChar).addItemName(item).addNumber(item.getReferencePrice() / 2));
        continue;
      }
     
      // char wants to buy item that he doesn't have
      if (activeChar.getInventory().getItemByItemId(itemId) == null)
        continue;
     
      if (item.isStackable())
      {
        for (TradeItem ti : listbuy)
        {
          if (ti.getItemId() == itemId)
          {
View Full Code Here

      statement.setLong(1, objectId);
      statement.setString(2, loc.name());
      item_rset = statement.executeQuery();
      if(item_rset.next())
      {
        L2Item item = ItemTable.getInstance().getTemplate(item_rset.getInt("item_id"));
        if(item == null)
        {
          return null;
        }
        if(item.isTemporal() && item_rset.getInt("shadow_life_time") <= 0)
        {
          return null;
        }
        inst = new TradeItem();
        inst.setObjectId(objectId);
        inst.setItemId(item.getItemId());
        inst.setCount(item_rset.getLong("count"));
        inst.setEnchantLevel(item_rset.getInt("enchant_level"));
        // load augmentation and elemental enchant
        if(item.isEquipable())
        {
          inst.restoreAttributes(con);
        }
      }
    }
View Full Code Here

      int[] item = weapons[i];
      if(item == null)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      if(itm.getItemGrade().ordinal() < mingrade.ordinal() || itm.getItemGrade().ordinal() > maxgrade.ordinal())
      {
        continue;
      }
      int[] price = getSaInsertPrice(itm);
      if(price == null)
View Full Code Here

      int[] item = weapons[i];
      if(item == null)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      int price = getSARemovePrice(itm);
      if(item[ItemTable.WEX_SA1] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA1], 1));
View Full Code Here

      int[] item = weapons[i];
      if(item == null)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      int[] price = getPvPWeaponPrice(itm);
      if(price == null)
      {
        continue;
      }
      if(item[ItemTable.WEX_PVP1] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA1] > 0 ? item[ItemTable.WEX_SA1] : i, 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP1], 1));
        list.addEntry(e1);
      }
      if(item[ItemTable.WEX_PVP2] > 0 && item[ItemTable.WEX_SA2] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA2], 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP2], 1));
        list.addEntry(e1);
      }
      if(item[ItemTable.WEX_PVP3] > 0 && item[ItemTable.WEX_SA3] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_SA3], 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_PVP3], 1));
        list.addEntry(e1);
      }
      if(item[ItemTable.WEX_RARE_PVP1] > 0 && (item[ItemTable.WEX_RARE_SA1] > 0 || item[ItemTable.WEX_RARE] > 0))
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA1] > 0 ? item[ItemTable.WEX_RARE_SA1] : item[ItemTable.WEX_RARE], 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP1], 1));
        list.addEntry(e1);
      }
      if(item[ItemTable.WEX_RARE_PVP2] > 0 && item[ItemTable.WEX_RARE_SA2] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA2], 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP2], 1));
        list.addEntry(e1);
      }
      if(item[ItemTable.WEX_RARE_PVP3] > 0 && item[ItemTable.WEX_RARE_SA3] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(item[ItemTable.WEX_RARE_SA3], 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.WEX_RARE_PVP3], 1));
        list.addEntry(e1);
      }
    }
    int[][] armors = ItemTable.getInstance().getArmorEx();
    for(int i = 0; i < armors.length; i++)
    {
      int[] item = armors[i];
      if(item == null || item[ItemTable.AEX_PvP] <= 0)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(item[ItemTable.AEX_UNSEALED_1] > 0 ? item[ItemTable.AEX_UNSEALED_1] : i);
      int[] price = getPvPArmorPrice(itm);
      if(price == null)
      {
        continue;
      }
      if(item[ItemTable.AEX_PvP] > 0)
      {
        MultiSellEntry e1 = new MultiSellEntry(entId++);
        e1.addIngredient(new MultiSellIngredient(itm.getItemId(), 1));
        e1.addIngredient(new MultiSellIngredient(L2Item.ITEM_ID_FAME, price[0]));
        e1.addIngredient(new MultiSellIngredient(57, price[1]));
        e1.addProduct(new MultiSellIngredient(item[ItemTable.AEX_PvP], 1));
        list.addEntry(e1);
      }
View Full Code Here

      int[] item = armors[i];
      if(item == null)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      int[] price = getPvPArmorPrice(itm);
      if(price == null)
      {
        continue;
      }
View Full Code Here

      int[] item = armors[i];
      if(item == null)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      if(itm.getItemGrade().ordinal() < mingrade.ordinal() || itm.getItemGrade().ordinal() > maxgrade.ordinal())
      {
        continue;
      }
      if(item[ItemTable.AEX_UNSEALED_1] > 0)
      {
View Full Code Here

      int[] item = armors[i];
      if(item == null || item[ItemTable.AEX_RESEAL_PRICE] < 0)
      {
        continue;
      }
      L2Item itm = ItemTable.getInstance().getTemplate(i);
      if(itm.getItemGrade().ordinal() < mingrade.ordinal() || itm.getItemGrade().ordinal() > maxgrade.ordinal())
      {
        continue;
      }
      if(item[ItemTable.AEX_UNSEALED_1] > 0)
      {
View Full Code Here

TOP

Related Classes of l2p.gameserver.templates.L2Item

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.