Examples of addIngredient()


Examples of lineage2.gameserver.model.base.MultiSellEntry.addIngredient()

        }
        if (d.getAttributes().getNamedItem("unholyAttr") != null)
        {
          mi.getItemAttributes().setUnholy(Integer.parseInt(d.getAttributes().getNamedItem("unholyAttr").getNodeValue()));
        }
        entry.addIngredient(mi);
      }
      else if (NODE_PRODUCTION.equalsIgnoreCase(d.getNodeName()))
      {
        int id = Integer.parseInt(d.getAttributes().getNamedItem("id").getNodeValue());
        long count = Long.parseLong(d.getAttributes().getNamedItem("count").getNodeValue());
View Full Code Here

Examples of lineage2.gameserver.model.base.MultiSellEntry.addIngredient()

    if (((ingredient = parseItemIdAndCount(a[0])) == null) || ((production = parseItemIdAndCount(a[1])) == null))
    {
      return null;
    }
    MultiSellEntry entry = new MultiSellEntry();
    entry.addIngredient(new MultiSellIngredient((int) ingredient[0], ingredient[1]));
    entry.addProduct(new MultiSellIngredient((int) production[0], production[1]));
    return entry;
  }
 
  /**
 
View Full Code Here

Examples of lineage2.gameserver.model.base.MultiSellEntry.addIngredient()

                  if (enchant && (ig.getItemId() > 0) && ItemHolder.getInstance().getTemplate(ig.getItemId()).canBeEnchanted())
                  {
                    ig.setItemEnchant(item.getEnchantLevel());
                    ig.setItemAttributes(item.getAttributes().clone());
                  }
                  possibleEntry.addIngredient(ig);
                }
                list.entries.add(possibleEntry);
                break;
              }
            }
View Full Code Here

Examples of lineage2.gameserver.model.base.MultiSellEntry.addIngredient()

    {
      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);
        possibleEntry.addIngredient(new MultiSellIngredient(itm.getItemId(), 1, itm.getEnchantLevel()));
        possibleEntry.addIngredient(new MultiSellIngredient(ItemTemplate.ITEM_ID_ADENA, Math.round(itm.getTemplate().getCrystalCount() * crystal.getReferencePrice() * 0.05), 0));
        list.addEntry(possibleEntry);
      }
    }
    MultiSellHolder.getInstance().SeparateAndSend(list, player, castle == null ? 0. : castle.getTaxRate());
View Full Code Here

Examples of lineage2.gameserver.model.base.MultiSellEntry.addIngredient()

      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);
        possibleEntry.addIngredient(new MultiSellIngredient(itm.getItemId(), 1, itm.getEnchantLevel()));
        possibleEntry.addIngredient(new MultiSellIngredient(ItemTemplate.ITEM_ID_ADENA, Math.round(itm.getTemplate().getCrystalCount() * crystal.getReferencePrice() * 0.05), 0));
        list.addEntry(possibleEntry);
      }
    }
    MultiSellHolder.getInstance().SeparateAndSend(list, player, castle == null ? 0. : castle.getTaxRate());
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Multisell.MultiSellEntry.addIngredient()

              if ((tempItem instanceof L2Armor) || (tempItem instanceof L2Weapon))
                newIngredient.setEnchantmentLevel(enchantLevel);
          }

          // finally, add this ingredient to the entry
          newEntry.addIngredient(newIngredient);
        }
        // Next add the adena amount, if any
        if (totalAdenaCount > 0)
          newEntry.addIngredient(L2Multisell.getInstance().new MultiSellIngredient(57, totalAdenaCount, false, false));
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Multisell.MultiSellEntry.addIngredient()

          // finally, add this ingredient to the entry
          newEntry.addIngredient(newIngredient);
        }
        // Next add the adena amount, if any
        if (totalAdenaCount > 0)
          newEntry.addIngredient(L2Multisell.getInstance().new MultiSellIngredient(57, totalAdenaCount, false, false));

        // Now modify the enchantment level of products, if necessary
        for (MultiSellIngredient ing : templateEntry.getProducts())
        {
          // load the ingredient from the template
View Full Code Here

Examples of org.bukkit.inventory.ShapelessRecipe.addIngredient()

    pm.registerEvents(new SetListener(this), this);

    getCommand("diablodrops").setExecutor(new DiabloDropCommand(this));

    ShapelessRecipe re = new ShapelessRecipe(new IdentifyTome());
    re.addIngredient(3, Material.BOOK);
    re.addIngredient(Material.EYE_OF_ENDER);
    this.getServer().addRecipe(re);

    if (config.getBoolean("Plugin.AutoUpdate", true)) {
      getServer().getScheduler().runTask(this, new Runnable() {
View Full Code Here

Examples of org.bukkit.inventory.ShapelessRecipe.addIngredient()

    getCommand("diablodrops").setExecutor(new DiabloDropCommand(this));

    ShapelessRecipe re = new ShapelessRecipe(new IdentifyTome());
    re.addIngredient(3, Material.BOOK);
    re.addIngredient(Material.EYE_OF_ENDER);
    this.getServer().addRecipe(re);

    if (config.getBoolean("Plugin.AutoUpdate", true)) {
      getServer().getScheduler().runTask(this, new Runnable() {
        @Override
View Full Code Here

Examples of org.bukkit.inventory.ShapelessRecipe.addIngredient()

    public static ShapelessRecipe getChimaeraWingRecipe() {
        Material ingredient = Config.getInstance().getChimaeraItem();
        int amount = Config.getInstance().getChimaeraRecipeCost();

        ShapelessRecipe chimeraWing = new ShapelessRecipe(getChimaeraWing(1));
        chimeraWing.addIngredient(amount, ingredient);
        return chimeraWing;
    }
}
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.