Package net.sf.l2j.gameserver.templates

Examples of net.sf.l2j.gameserver.templates.L2Item


      {
        Util.handleIllegalPlayerAction(player,"Warning!! Character "+player.getName()+" of account "+player.getAccountName()+" sent a false BuyList list_id.",Config.DEFAULT_PUNISH);
        return;
      }

            L2Item template = ItemTable.getInstance().getTemplate(itemId);
            weight += template.getWeight();
            slots++;

            totalPrice += Config.WEAR_PRICE;
            if (totalPrice > Integer.MAX_VALUE)
            {
View Full Code Here


            continue// do not yet add this adena amount to the list as taxIngredient adena might be entered later (order not guaranteed)
          }
          // if it is an armor/weapon, modify the enchantment level appropriately, if necessary
          else if (maintainEnchantment)
          {
              L2Item tempItem = ItemTable.getInstance().createDummyItem(newIngredient.getItemId()).getItem();
              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));

        // Now modify the enchantment level of products, if necessary
        for (MultiSellIngredient ing : templateEntry.getProducts())
        {
          // load the ingredient from the template
          MultiSellIngredient newIngredient = L2Multisell.getInstance().new MultiSellIngredient(ing);

          if (maintainEnchantment)
            {
              // if it is an armor/weapon, modify the enchantment level appropriately
              // (note, if maintain enchantment is "false" this modification will result to a +0)
              L2Item tempItem = ItemTable.getInstance().createDummyItem(newIngredient.getItemId()).getItem();
              if ((tempItem instanceof L2Armor) || (tempItem instanceof L2Weapon))
                newIngredient.setEnchantmentLevel(enchantLevel);
            }
          newEntry.addProduct(newIngredient);
        }
View Full Code Here

  {
    L2Weapon weaponItem = null;
    if ((classId >= 0x00) && (classId <= 0x09))
    {
      // human fighter fists
      L2Item temp = ItemTable.getInstance().getTemplate(246);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x0a) && (classId <= 0x11))
    {
      // human mage fists
      L2Item temp = ItemTable.getInstance().getTemplate(251);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x12) && (classId <= 0x18))
    {
      // elven fighter fists
      L2Item temp = ItemTable.getInstance().getTemplate(244);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x19) && (classId <= 0x1e))
    {
      // elven mage fists
      L2Item temp = ItemTable.getInstance().getTemplate(249);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x1f) && (classId <= 0x25))
    {
      // dark elven fighter fists
      L2Item temp = ItemTable.getInstance().getTemplate(245);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x26) && (classId <= 0x2b))
    {
      // dark elven mage fists
      L2Item temp = ItemTable.getInstance().getTemplate(250);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x2c) && (classId <= 0x30))
    {
      // orc fighter fists
      L2Item temp = ItemTable.getInstance().getTemplate(248);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x31) && (classId <= 0x34))
    {
      // orc mage fists
      L2Item temp = ItemTable.getInstance().getTemplate(252);
      weaponItem = (L2Weapon) temp;
    }
    else if ((classId >= 0x35) && (classId <= 0x39))
    {
      // dwarven fists
      L2Item temp = ItemTable.getInstance().getTemplate(247);
      weaponItem = (L2Weapon) temp;
    }
   
    return weaponItem;
  }
View Full Code Here

    if (weapon == null)
    {
      return getFistsWeaponItem();
    }
   
    L2Item item = weapon.getItem();
   
    if (item instanceof L2Weapon)
    {
      return (L2Weapon) item;
    }
View Full Code Here

TOP

Related Classes of net.sf.l2j.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.