Package lineage2.gameserver.templates

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


              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

              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) 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

   * @param template NpcTemplate
   */
  public Kama26BossInstance(int objectId, NpcTemplate template)
  {
    super(objectId, template);
    getMinionList().addMinion(new MinionData(18556, 1));
  }
View Full Code Here

    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
        if (template != null)
        {
          final NpcInstance a = template.getNewInstance();
          a.setCurrentHpMp(a.getMaxHp(), a.getMaxMp());
          a.spawnMe(actor.getLoc());
        }
      }
    }, 10000L);
View Full Code Here

      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
View Full Code Here

      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
    {
      if (player != null)
      {
        player.teleToLocation(new Location(207559, 86429, -1000));
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.OptionDataTemplate

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.