Examples of ShuttleTemplate


Examples of lineage2.gameserver.templates.ShuttleTemplate

   */
  public Shuttle initShuttle(String name, int shuttleId)
  {
    try
    {
      ShuttleTemplate template = ShuttleTemplateHolder.getInstance().getTemplate(shuttleId);
      Shuttle shuttle = new Shuttle(IdFactory.getInstance().getNextId(), template);
      shuttle.setName(name);
      addBoat(shuttle);
      return shuttle;
    }
View Full Code Here

Examples of lineage2.gameserver.templates.ShuttleTemplate

  {
    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element shuttleElement = iterator.next();
      int shuttleId = Integer.parseInt(shuttleElement.attributeValue("id"));
      ShuttleTemplate template = new ShuttleTemplate(shuttleId);
      for (Iterator<?> doorsIterator = shuttleElement.elementIterator("doors"); doorsIterator.hasNext();)
      {
        Element doorsElement = (Element) doorsIterator.next();
        for (Iterator<?> doorIterator = doorsElement.elementIterator("door"); doorIterator.hasNext();)
        {
          Element doorElement = (Element) doorIterator.next();
          int doorId = Integer.parseInt(doorElement.attributeValue("id"));
          StatsSet set = new StatsSet();
          for (Iterator<?> setIterator = doorElement.elementIterator("set"); setIterator.hasNext();)
          {
            Element setElement = (Element) setIterator.next();
            set.set(setElement.attributeValue("name"), setElement.attributeValue("value"));
          }
          template.addDoor(new ShuttleDoor(doorId, set));
        }
      }
      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.