Examples of OptionDataTemplate


Examples of lineage2.gameserver.templates.OptionDataTemplate

              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

Examples of lineage2.gameserver.templates.OptionDataTemplate

    }
    Player player = actor.getPlayer();
    boolean needSendInfo = false;
    for (int i : item.getEnchantOptions())
    {
      OptionDataTemplate template = OptionDataHolder.getInstance().getTemplate(i);
      if (template == null)
      {
        continue;
      }
      player.removeStatsOwner(template);
      for (Skill skill : template.getSkills())
      {
        player.removeSkill(skill, false);
        needSendInfo = true;
      }
      for (TriggerInfo triggerInfo : template.getTriggerList())
      {
        player.removeTrigger(triggerInfo);
      }
    }
    if (needSendInfo)
View Full Code Here

Examples of lineage2.gameserver.templates.OptionDataTemplate

    stats[0] = 0x0000FFFF & item.getAugmentationId();
    stats[1] = item.getAugmentationId() >> 16;
    boolean sendList = false;
    for (int i : stats)
    {
      OptionDataTemplate template = OptionDataHolder.getInstance().getTemplate(i);
      if (template == null)
      {
        continue;
      }
      player.removeStatsOwner(template);
      for (Skill skill : template.getSkills())
      {
        sendList = true;
        player.removeSkill(skill);
      }
      player.removeTriggers(template);
View Full Code Here

Examples of lineage2.gameserver.templates.OptionDataTemplate

    stats[1] = item.getAugmentationId() >> 16;
    boolean sendList = false;
    boolean sendReuseList = false;
    for (int i : stats)
    {
      OptionDataTemplate template = OptionDataHolder.getInstance().getTemplate(i);
      if (template == null)
      {
        continue;
      }
      player.addStatFuncs(template.getStatFuncs(template));
      for (Skill skill : template.getSkills())
      {
        sendList = true;
        player.addSkill(skill);
        if (player.isSkillDisabled(skill))
        {
View Full Code Here

Examples of lineage2.gameserver.templates.OptionDataTemplate

    }
    Player player = actor.getPlayer();
    boolean needSendInfo = false;
    for (int i : item.getEnchantOptions())
    {
      OptionDataTemplate template = OptionDataHolder.getInstance().getTemplate(i);
      if (template == null)
      {
        continue;
      }
      player.addStatFuncs(template.getStatFuncs(template));
      for (Skill skill : template.getSkills())
      {
        player.addSkill(skill, false);
        needSendInfo = true;
      }
      for (TriggerInfo triggerInfo : template.getTriggerList())
      {
        player.addTrigger(triggerInfo);
      }
    }
    if (needSendInfo)
View Full Code Here

Examples of lineage2.gameserver.templates.OptionDataTemplate

              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

Examples of lineage2.gameserver.templates.OptionDataTemplate

              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

Examples of lineage2.gameserver.templates.OptionDataTemplate

  protected void readData(Element rootElement) throws Exception
  {
    for (Iterator<Element> itemIterator = rootElement.elementIterator(); itemIterator.hasNext();)
    {
      Element optionDataElement = itemIterator.next();
      OptionDataTemplate template = new OptionDataTemplate(Integer.parseInt(optionDataElement.attributeValue("id")));
      for (Iterator<Element> subIterator = optionDataElement.elementIterator(); subIterator.hasNext();)
      {
        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<Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
          {
            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.addSkill(skill);
            }
            else
            {
              info("Skill not found(" + id + "," + level + ") for option data:" + template.getId() + "; file:" + getCurrentFileName());
            }
          }
        }
      }
      getHolder().addTemplate(template);
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.