Package net.sf.l2j.gameserver

Examples of net.sf.l2j.gameserver.Item


   * Returns a new object Item
   * @return
   */
    public Item newItem()
  {
        return new Item();
  }
View Full Code Here


                // Add item in correct FastMap
                while(rset.next())
                {
                    if (selectQuery.endsWith("etcitem"))
                    {
                        Item newItem    = readItem(rset);
                        itemData.put(newItem.id, newItem);
                    }
                    else if (selectQuery.endsWith("armor"))
                    {
                        Item newItem    = readArmor(rset);
                        armorData.put(newItem.id, newItem);
                    }
                    else if (selectQuery.endsWith("weapon"))
                    {
                        Item newItem    = readWeapon(rset);
                        weaponData.put(newItem.id, newItem);
                    }
                }

                rset.close();
View Full Code Here

     * @return Item : object created from the database record
   * @throws SQLException
     */
    private Item readWeapon(ResultSet rset) throws SQLException
    {
        Item item   = new Item();
        item.set    = new StatsSet();
        item.type   = _weaponTypes.get(rset.getString("weaponType"));
        item.id     = rset.getInt("item_id");
        item.name   = rset.getString("name");

View Full Code Here

     * @return Item : object created from the database record
   * @throws SQLException
     */
    private Item readArmor(ResultSet rset) throws SQLException
  {
        Item item   = new Item();
        item.set    = new StatsSet();
        item.type   = _armorTypes.get(rset.getString("armor_type"));
        item.id     = rset.getInt("item_id");
        item.name   = rset.getString("name");

View Full Code Here

     * @return Item : object created from the database record
   * @throws SQLException
     */
    private Item readItem(ResultSet rset) throws SQLException
    {
        Item item   = new Item();
        item.set    = new StatsSet();
        item.id     = rset.getInt("item_id");

        item.set.set("item_id", item.id);
        item.set.set("crystallizable", Boolean.valueOf(rset.getString("crystallizable")));
View Full Code Here

                for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
                {
                    if ("item".equalsIgnoreCase(d.getNodeName()))
                    {
                        setCurrentItem(new Item());
                        parseItem(d);
                        _itemsInFile.add(_currentItem.item);
                        resetTable();
                    }
                }
            }
            else if ("item".equalsIgnoreCase(n.getNodeName()))
            {
                setCurrentItem(new Item());
                parseItem(n);
                _itemsInFile.add(_currentItem.item);
            }
        }
    }
View Full Code Here

        String itemName = n.getAttributes().getNamedItem("name").getNodeValue();

        _currentItem.id = itemId;
        _currentItem.name = itemName;

        Item item;
        if ((item = _itemData.get(_currentItem.id)) == null)
        {
          throw new IllegalStateException("No SQL data for Item ID: "+itemId+" - name: "+itemName);
        }
        _currentItem.set = item.set;
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.Item

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.