Package lineage2.gameserver.templates

Examples of lineage2.gameserver.templates.StatsSet


  {
    if (!_heroes.isEmpty())
    {
      for (Integer heroId : _heroes.keySet())
      {
        StatsSet hero = _heroes.get(heroId);
        if (hero.getInteger(Olympiad.CLASS_ID) == classid)
        {
          return heroId;
        }
      }
    }
View Full Code Here


        int id = player.getObjectId();
        if ((id > 0) && (heroId != id))
        {
          continue;
        }
        StatsSet hero = _heroes.get(heroId);
        statement.setInt(1, heroId);
        statement.setInt(2, hero.getInteger(COUNT));
        statement.setInt(3, hero.getInteger(PLAYED));
        statement.setInt(4, 0);
        statement.execute();
        if ((_completeHeroes != null) && !_completeHeroes.containsKey(heroId))
        {
          _completeHeroes.remove(heroId);
View Full Code Here

                    if (tmp.getAuctionItemId() == auctionItemId)
                    {
                      throw new IllegalArgumentException("Dublicated auction item id " + auctionItemId + "for instanceId: " + instanceId);
                    }
                  }
                  StatsSet itemExtra = new StatsSet();
                  for (Node nd = nc.getFirstChild(); nd != null; nd = nd.getNextSibling())
                  {
                    if ("extra".equalsIgnoreCase(nd.getNodeName()))
                    {
                      NamedNodeMap nad = nd.getAttributes();
                      for (int i = nad.getLength(); i-- > 0;)
                      {
                        Node n = nad.item(i);
                        if (n != null)
                        {
                          itemExtra.set(n.getNodeName(), n.getNodeValue());
                        }
                      }
                    }
                  }
                  AuctionItem item = new AuctionItem(auctionItemId, auctionLenght, auctionInitBid, itemId, itemCount, itemExtra);
View Full Code Here

   */
  private static StatsSet getVars()
  {
    if (server_vars == null)
    {
      server_vars = new StatsSet();
      LoadFromDB();
    }
    return server_vars;
  }
View Full Code Here

      StatAttributes min_attr = null;
      StatAttributes max_attr = null;
      StatAttributes base_attr = null;
      BaseArmorDefence arm_defence = null;
      BaseJewelDefence jewl_defence = null;
      StatsSet stats_set = new StatsSet();
      List<StartItem> start_items = new ArrayList<>();
      List<Location> start_locations = new ArrayList<>();
      TIntObjectHashMap<LvlUpData> lvl_up_data = new TIntObjectHashMap<>();
      for (Iterator<Element> subIterator = element.elementIterator(); subIterator.hasNext();)
      {
        Element subElement = subIterator.next();
        if ("creation_data".equalsIgnoreCase(subElement.getName()))
        {
          for (Element e : subElement.elements())
          {
            if ("start_equipments".equalsIgnoreCase(e.getName()))
            {
              for (Element e2 : e.elements())
              {
                if ("equipment".equalsIgnoreCase(e2.getName()))
                {
                  int item_id = Integer.parseInt(e2.attributeValue("item_id"));
                  long count = Long.parseLong(e2.attributeValue("count"));
                  boolean equiped = Boolean.parseBoolean(e2.attributeValue("equiped"));
                  start_items.add(new StartItem(item_id, count, equiped));
                }
              }
            }
            else if ("start_points".equalsIgnoreCase(e.getName()))
            {
              for (Element e2 : e.elements())
              {
                if ("point".equalsIgnoreCase(e2.getName()))
                {
                  start_locations.add(Location.parse(e2));
                }
              }
            }
          }
        }
        else if ("stats_data".equalsIgnoreCase(subElement.getName()))
        {
          for (Element e : subElement.elements())
          {
            if (("min_attributes".equalsIgnoreCase(e.getName())) || ("max_attributes".equalsIgnoreCase(e.getName())) || ("base_attributes".equalsIgnoreCase(e.getName())))
            {
              int _int = Integer.parseInt(e.attributeValue("int"));
              int str = Integer.parseInt(e.attributeValue("str"));
              int con = Integer.parseInt(e.attributeValue("con"));
              int men = Integer.parseInt(e.attributeValue("men"));
              int dex = Integer.parseInt(e.attributeValue("dex"));
              int wit = Integer.parseInt(e.attributeValue("wit"));
              StatAttributes attr = new StatAttributes(_int, str, con, men, dex, wit);
              if ("min_attributes".equalsIgnoreCase(e.getName()))
              {
                min_attr = attr;
              }
              else if ("max_attributes".equalsIgnoreCase(e.getName()))
              {
                max_attr = attr;
              }
              else if ("base_attributes".equalsIgnoreCase(e.getName()))
              {
                base_attr = attr;
              }
            }
            else if ("armor_defence".equalsIgnoreCase(e.getName()))
            {
              int chest = Integer.parseInt(e.attributeValue("chest"));
              int legs = Integer.parseInt(e.attributeValue("legs"));
              int helmet = Integer.parseInt(e.attributeValue("helmet"));
              int boots = Integer.parseInt(e.attributeValue("boots"));
              int gloves = Integer.parseInt(e.attributeValue("gloves"));
              int underwear = Integer.parseInt(e.attributeValue("underwear"));
              int cloak = Integer.parseInt(e.attributeValue("cloak"));
              arm_defence = new BaseArmorDefence(chest, legs, helmet, boots, gloves, underwear, cloak);
            }
            else if ("jewel_defence".equalsIgnoreCase(e.getName()))
            {
              int r_earring = Integer.parseInt(e.attributeValue("r_earring"));
              int l_earring = Integer.parseInt(e.attributeValue("l_earring"));
              int r_ring = Integer.parseInt(e.attributeValue("r_ring"));
              int l_ring = Integer.parseInt(e.attributeValue("l_ring"));
              int necklace = Integer.parseInt(e.attributeValue("necklace"));
              jewl_defence = new BaseJewelDefence(r_earring, l_earring, r_ring, l_ring, necklace);
            }
            else if ("base_stats".equalsIgnoreCase(e.getName()))
            {
              for (Element e2 : e.elements())
              {
                if ("stat_set".equalsIgnoreCase(e2.getName()))
                {
                  stats_set.set(e2.attributeValue("name"), e2.attributeValue("value"));
                }
                else if ("regen_lvl_data".equalsIgnoreCase(e2.getName()))
                {
                  for (Element e3 : e2.elements())
                  {
View Full Code Here

  protected void readData(org.dom4j.Element rootElement) throws Exception
  {
    for (Iterator<org.dom4j.Element> itemIterator = rootElement.elementIterator(); itemIterator.hasNext();)
    {
      org.dom4j.Element itemElement = itemIterator.next();
      StatsSet set = new StatsSet();
      set.set("item_id", itemElement.attributeValue("id"));
      set.set("name", itemElement.attributeValue("name"));
      set.set("add_name", itemElement.attributeValue("add_name", StringUtils.EMPTY));
      int slot = 0;
      for (Iterator<org.dom4j.Element> subIterator = itemElement.elementIterator(); subIterator.hasNext();)
      {
        org.dom4j.Element subElement = subIterator.next();
        String subName = subElement.getName();
        if (subName.equalsIgnoreCase("set"))
        {
          set.set(subElement.attributeValue("name"), subElement.attributeValue("value"));
        }
        else if (subName.equalsIgnoreCase("equip"))
        {
          for (Iterator<org.dom4j.Element> slotIterator = subElement.elementIterator(); slotIterator.hasNext();)
          {
            org.dom4j.Element slotElement = slotIterator.next();
            Bodypart bodypart = Bodypart.valueOf(slotElement.attributeValue("id"));
            if (bodypart.getReal() != null)
            {
              slot = bodypart.mask();
            }
            else
            {
              slot |= bodypart.mask();
            }
          }
        }
      }
      set.set("bodypart", slot);
      ItemTemplate template = null;
      try
      {
        if (itemElement.getName().equalsIgnoreCase("weapon"))
        {
          if (!set.containsKey("class"))
          {
            if ((slot & ItemTemplate.SLOT_L_HAND) > 0)
            {
              set.set("class", ItemTemplate.ItemClass.ARMOR);
            }
            else
            {
              set.set("class", ItemTemplate.ItemClass.WEAPON);
            }
          }
          template = new WeaponTemplate(set);
        }
      }
      catch (Exception e)
      {
        warn("Fail create item: " + set.get("item_id"), e);
        continue;
      }
      for (Iterator<org.dom4j.Element> subIterator = itemElement.elementIterator(); subIterator.hasNext();)
      {
        org.dom4j.Element subElement = subIterator.next();
        String subName = subElement.getName();
        if (subName.equalsIgnoreCase("for"))
        {
          parseFor(subElement, template);
        }
        else if (subName.equalsIgnoreCase("triggers"))
        {
          parseTriggers(subElement, template);
        }
        else if (subName.equalsIgnoreCase("skills"))
        {
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            int id = Integer.parseInt(nextElement.attributeValue("id"));
            int level = Integer.parseInt(nextElement.attributeValue("level"));
            Skill skill = SkillTable.getInstance().getInfo(id, level);
            if (skill != null)
            {
              template.attachSkill(skill);
            }
            else
            {
              info("Skill not found(" + id + "," + level + ") for item:" + set.getObject("item_id") + "; file:" + getCurrentFileName());
            }
          }
        }
        else if (subName.equalsIgnoreCase("enchant4_skill"))
        {
          int id = Integer.parseInt(subElement.attributeValue("id"));
          int level = Integer.parseInt(subElement.attributeValue("level"));
          Skill skill = SkillTable.getInstance().getInfo(id, level);
          if (skill != null)
          {
            template.setEnchant4Skill(skill);
          }
        }
        else if (subName.equalsIgnoreCase("unequip_skill"))
        {
          int id = Integer.parseInt(subElement.attributeValue("id"));
          int level = Integer.parseInt(subElement.attributeValue("level"));
          Skill skill = SkillTable.getInstance().getInfo(id, level);
          if (skill != null)
          {
            template.setUnequipeSkill(skill);
          }
        }
        else if (subName.equalsIgnoreCase("cond"))
        {
          Condition condition = parseFirstCond(subElement);
          if (condition != null)
          {
            int msgId = parseNumber(subElement.attributeValue("msgId")).intValue();
            condition.setSystemMsg(msgId);
            template.setCondition(condition);
          }
        }
        else if (subName.equalsIgnoreCase("attributes"))
        {
          int[] attributes = new int[6];
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            Element element;
            if (nextElement.getName().equalsIgnoreCase("attribute"))
            {
              element = Element.getElementByName(nextElement.attributeValue("element"));
              attributes[element.getId()] = Integer.parseInt(nextElement.attributeValue("value"));
            }
          }
          template.setBaseAtributeElements(attributes);
        }
        else if  (subName.equalsIgnoreCase("enchant_options"))
        {
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            if (nextElement.getName().equalsIgnoreCase("level"))
            {
              int val = Integer.parseInt(nextElement.attributeValue("val"));
              int i = 0;
              int[] options = new int[3];
              for (org.dom4j.Element optionElement : nextElement.elements())
              {
                OptionDataTemplate optionData = OptionDataHolder.getInstance().getTemplate(Integer.parseInt(optionElement.attributeValue("id")));
                if (optionData == null)
                {
                  error("Not found option_data for id: " + optionElement.attributeValue("id") + "; item_id: " + set.get("item_id"));
                  continue;
                }
                options[i++] = optionData.getId();
              }
              template.addEnchantOptions(val, options);
View Full Code Here

   * @param template Object
   */
  protected void attachEffect(Node n, Object template)
  {
    NamedNodeMap attrs = n.getAttributes();
    StatsSet set = new StatsSet();
    set.set("name", attrs.getNamedItem("name").getNodeValue());
    set.set("object", template);
    if (attrs.getNamedItem("count") != null)
    {
      set.set("count", parseNumber(attrs.getNamedItem("count").getNodeValue()).intValue());
    }
    if (attrs.getNamedItem("time") != null)
    {
      int time = parseNumber(attrs.getNamedItem("time").getNodeValue()).intValue();
      set.set("time", time);
    }
    set.set("value", attrs.getNamedItem("val") != null ? parseNumber(attrs.getNamedItem("val").getNodeValue()).doubleValue() : 0.);
    set.set("abnormal", AbnormalEffect.NULL);
    set.set("abnormal2", AbnormalEffect.NULL);
    set.set("abnormal3", AbnormalEffect.NULL);
    if (attrs.getNamedItem("abnormal") != null)
    {
      AbnormalEffect ae = AbnormalEffect.getByName(attrs.getNamedItem("abnormal").getNodeValue());
      if (ae.isSpecial())
      {
        set.set("abnormal2", ae);
      }
      if (ae.isEvent())
      {
        set.set("abnormal3", ae);
      }
      else
      {
        set.set("abnormal", ae);
      }
    }
    if (attrs.getNamedItem("stackType") != null)
    {
      set.set("stackType", attrs.getNamedItem("stackType").getNodeValue());
    }
    if (attrs.getNamedItem("stackType2") != null)
    {
      set.set("stackType2", attrs.getNamedItem("stackType2").getNodeValue());
    }
    if (attrs.getNamedItem("stackOrder") != null)
    {
      set.set("stackOrder", parseNumber(attrs.getNamedItem("stackOrder").getNodeValue()).intValue());
    }
    if (attrs.getNamedItem("applyOnCaster") != null)
    {
      set.set("applyOnCaster", Boolean.valueOf(attrs.getNamedItem("applyOnCaster").getNodeValue()));
    }
    if (attrs.getNamedItem("applyOnSummon") != null)
    {
      set.set("applyOnSummon", Boolean.valueOf(attrs.getNamedItem("applyOnSummon").getNodeValue()));
    }
    if (attrs.getNamedItem("displayId") != null)
    {
      set.set("displayId", parseNumber(attrs.getNamedItem("displayId").getNodeValue()).intValue());
    }
    if (attrs.getNamedItem("displayLevel") != null)
    {
      set.set("displayLevel", parseNumber(attrs.getNamedItem("displayLevel").getNodeValue()).intValue());
    }
    if (attrs.getNamedItem("chance") != null)
    {
      set.set("chance", parseNumber(attrs.getNamedItem("chance").getNodeValue()).intValue());
    }
    if (attrs.getNamedItem("cancelOnAction") != null)
    {
      set.set("cancelOnAction", Boolean.valueOf(attrs.getNamedItem("cancelOnAction").getNodeValue()));
    }
    if (attrs.getNamedItem("cancelOnAttacked") != null)
    {
      set.set("cancelOnAttacked", Boolean.valueOf(attrs.getNamedItem("cancelOnAttacked").getNodeValue()));
    }
    if (attrs.getNamedItem("isOffensive") != null)
    {
      set.set("isOffensive", Boolean.valueOf(attrs.getNamedItem("isOffensive").getNodeValue()));
    }
    if (attrs.getNamedItem("isReflectable") != null)
    {
      set.set("isReflectable", Boolean.valueOf(attrs.getNamedItem("isReflectable").getNodeValue()));
    }
    EffectTemplate lt = new EffectTemplate(set);
    parseTemplate(n, lt);
    for (Node n1 = n.getFirstChild(); n1 != null; n1 = n1.getNextSibling())
    {
View Full Code Here

  @Override
  protected void readData(Element rootElement) throws Exception
  {
    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      StatsSet zoneDat = new StatsSet();
      Element zoneElement = iterator.next();
      if ("zone".equals(zoneElement.getName()))
      {
        zoneDat.set("name", zoneElement.attribute("name").getValue());
        zoneDat.set("type", zoneElement.attribute("type").getValue());
        Territory territory = null;
        boolean isShape;
        for (Iterator<Element> i = zoneElement.elementIterator(); i.hasNext();)
        {
          Element n = i.next();
          if ("set".equals(n.getName()))
          {
            zoneDat.set(n.attributeValue("name"), n.attributeValue("val"));
          }
          else if ("restart_point".equals(n.getName()))
          {
            List<Location> restartPoints = new ArrayList<>();
            for (Iterator<?> ii = n.elementIterator(); ii.hasNext();)
            {
              Element d = (Element) ii.next();
              if ("coords".equalsIgnoreCase(d.getName()))
              {
                Location loc = Location.parseLoc(d.attribute("loc").getValue());
                restartPoints.add(loc);
              }
            }
            zoneDat.set("restart_points", restartPoints);
          }
          else if ("PKrestart_point".equals(n.getName()))
          {
            List<Location> PKrestartPoints = new ArrayList<>();
            for (Iterator<?> ii = n.elementIterator(); ii.hasNext();)
            {
              Element d = (Element) ii.next();
              if ("coords".equalsIgnoreCase(d.getName()))
              {
                Location loc = Location.parseLoc(d.attribute("loc").getValue());
                PKrestartPoints.add(loc);
              }
            }
            zoneDat.set("PKrestart_points", PKrestartPoints);
          }
          else if ((isShape = "rectangle".equalsIgnoreCase(n.getName())) || "banned_rectangle".equalsIgnoreCase(n.getName()))
          {
            Shape shape = parseRectangle(n);
            if (territory == null)
            {
              territory = new Territory();
              zoneDat.set("territory", territory);
            }
            if (isShape)
            {
              territory.add(shape);
            }
            else
            {
              territory.addBanned(shape);
            }
          }
          else if ((isShape = "circle".equalsIgnoreCase(n.getName())) || "banned_cicrcle".equalsIgnoreCase(n.getName()))
          {
            Shape shape = parseCircle(n);
            if (territory == null)
            {
              territory = new Territory();
              zoneDat.set("territory", territory);
            }
            if (isShape)
            {
              territory.add(shape);
            }
            else
            {
              territory.addBanned(shape);
            }
          }
          else if ((isShape = "polygon".equalsIgnoreCase(n.getName())) || "banned_polygon".equalsIgnoreCase(n.getName()))
          {
            Polygon shape = parsePolygon(n);
            if (!shape.validate())
            {
              error("ZoneParser: invalid territory data : " + shape + ", zone: " + zoneDat.getString("name") + "!");
            }
            if (territory == null)
            {
              territory = new Territory();
              zoneDat.set("territory", territory);
            }
            if (isShape)
            {
              territory.add(shape);
            }
            else
            {
              territory.addBanned(shape);
            }
          }
        }
        if ((territory == null) || territory.getTerritories().isEmpty())
        {
          error("Empty territory for zone: " + zoneDat.get("name"));
        }
        ZoneTemplate template = new ZoneTemplate(zoneDat);
        getHolder().addTemplate(template);
      }
    }
View Full Code Here

  protected void readData(org.dom4j.Element rootElement) throws Exception
  {
    for (Iterator<org.dom4j.Element> itemIterator = rootElement.elementIterator(); itemIterator.hasNext();)
    {
      org.dom4j.Element itemElement = itemIterator.next();
      StatsSet set = new StatsSet();
      set.set("item_id", itemElement.attributeValue("id"));
      set.set("name", itemElement.attributeValue("name"));
      set.set("add_name", itemElement.attributeValue("add_name", StringUtils.EMPTY));
      int slot = 0;
      for (Iterator<org.dom4j.Element> subIterator = itemElement.elementIterator(); subIterator.hasNext();)
      {
        org.dom4j.Element subElement = subIterator.next();
        String subName = subElement.getName();
        if (subName.equalsIgnoreCase("set"))
        {
          set.set(subElement.attributeValue("name"), subElement.attributeValue("value"));
        }
        else if (subName.equalsIgnoreCase("equip"))
        {
          for (Iterator<org.dom4j.Element> slotIterator = subElement.elementIterator(); slotIterator.hasNext();)
          {
            org.dom4j.Element slotElement = slotIterator.next();
            Bodypart bodypart = Bodypart.valueOf(slotElement.attributeValue("id"));
            if (bodypart.getReal() != null)
            {
              slot = bodypart.mask();
            }
            else
            {
              slot |= bodypart.mask();
            }
          }
        }
      }
      set.set("bodypart", slot);
      ItemTemplate template = null;
      try
      {
        if (itemElement.getName().equalsIgnoreCase("armor"))
        {
          if (!set.containsKey("class"))
          {
            if ((slot & ItemTemplate.SLOTS_ARMOR) > 0)
            {
              set.set("class", ItemTemplate.ItemClass.ARMOR);
            }
            else if ((slot & ItemTemplate.SLOTS_JEWELRY) > 0)
            {
              set.set("class", ItemTemplate.ItemClass.JEWELRY);
            }
            else
            {
              set.set("class", ItemTemplate.ItemClass.ACCESSORY);
            }
          }
          template = new ArmorTemplate(set);
        }
      }
      catch (Exception e)
      {
        warn("Fail create item: " + set.get("item_id"), e);
        continue;
      }
      for (Iterator<org.dom4j.Element> subIterator = itemElement.elementIterator(); subIterator.hasNext();)
      {
        org.dom4j.Element subElement = subIterator.next();
        String subName = subElement.getName();
        if (subName.equalsIgnoreCase("for"))
        {
          parseFor(subElement, template);
        }
        else if (subName.equalsIgnoreCase("triggers"))
        {
          parseTriggers(subElement, template);
        }
        else if (subName.equalsIgnoreCase("skills"))
        {
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            int id = Integer.parseInt(nextElement.attributeValue("id"));
            int level = Integer.parseInt(nextElement.attributeValue("level"));
            Skill skill = SkillTable.getInstance().getInfo(id, level);
            if (skill != null)
            {
              template.attachSkill(skill);
            }
            else
            {
              info("Skill not found(" + id + "," + level + ") for item:" + set.getObject("item_id") + "; file:" + getCurrentFileName());
            }
          }
        }
        else if (subName.equalsIgnoreCase("enchant4_skill"))
        {
          int id = Integer.parseInt(subElement.attributeValue("id"));
          int level = Integer.parseInt(subElement.attributeValue("level"));
          Skill skill = SkillTable.getInstance().getInfo(id, level);
          if (skill != null)
          {
            template.setEnchant4Skill(skill);
          }
        }
        else if (subName.equalsIgnoreCase("unequip_skill"))
        {
          int id = Integer.parseInt(subElement.attributeValue("id"));
          int level = Integer.parseInt(subElement.attributeValue("level"));
          Skill skill = SkillTable.getInstance().getInfo(id, level);
          if (skill != null)
          {
            template.setUnequipeSkill(skill);
          }
        }
        else if (subName.equalsIgnoreCase("cond"))
        {
          Condition condition = parseFirstCond(subElement);
          if (condition != null)
          {
            int msgId = parseNumber(subElement.attributeValue("msgId")).intValue();
            condition.setSystemMsg(msgId);
            template.setCondition(condition);
          }
        }
        else if (subName.equalsIgnoreCase("attributes"))
        {
          int[] attributes = new int[6];
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            Element element;
            if (nextElement.getName().equalsIgnoreCase("attribute"))
            {
              element = Element.getElementByName(nextElement.attributeValue("element"));
              attributes[element.getId()] = Integer.parseInt(nextElement.attributeValue("value"));
            }
          }
          template.setBaseAtributeElements(attributes);
        }
        else if  (subName.equalsIgnoreCase("enchant_options"))
        {
          for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            org.dom4j.Element nextElement = nextIterator.next();
            if (nextElement.getName().equalsIgnoreCase("level"))
            {
              int val = Integer.parseInt(nextElement.attributeValue("val"));
              int i = 0;
              int[] options = new int[3];
              for (org.dom4j.Element optionElement : nextElement.elements())
              {
                OptionDataTemplate optionData = OptionDataHolder.getInstance().getTemplate(Integer.parseInt(optionElement.attributeValue("id")));
                if (optionData == null)
                {
                  error("Not found option_data for id: " + optionElement.attributeValue("id") + "; item_id: " + set.get("item_id"));
                  continue;
                }
                options[i++] = optionData.getId();
              }
              template.addEnchantOptions(val, options);
View Full Code Here

  protected void readData(Element rootElement)
  {
    for (Iterator<?> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element staticObjectElement = (Element) iterator.next();
      StatsSet set = new StatsSet();
      set.set("uid", staticObjectElement.attributeValue("id"));
      set.set("stype", staticObjectElement.attributeValue("stype"));
      set.set("path", staticObjectElement.attributeValue("path"));
      set.set("map_x", staticObjectElement.attributeValue("map_x"));
      set.set("map_y", staticObjectElement.attributeValue("map_y"));
      set.set("name", staticObjectElement.attributeValue("name"));
      set.set("x", staticObjectElement.attributeValue("x"));
      set.set("y", staticObjectElement.attributeValue("y"));
      set.set("z", staticObjectElement.attributeValue("z"));
      set.set("spawn", staticObjectElement.attributeValue("spawn"));
      getHolder().addTemplate(new StaticObjectTemplate(set));
    }
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.StatsSet

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.