Examples of DoorTemplate


Examples of lineage2.gameserver.templates.DoorTemplate

            {
              doors = new HashIntObjectMap<>();
            }
            boolean opened = (e.attributeValue("opened") != null) && Boolean.parseBoolean(e.attributeValue("opened"));
            boolean invul = (e.attributeValue("invul") == null) || Boolean.parseBoolean(e.attributeValue("invul"));
            DoorTemplate template = DoorHolder.getInstance().getTemplate(Integer.parseInt(e.attributeValue("id")));
            doors.put(template.getNpcId(), new InstantZone.DoorInfo(template, opened, invul));
          }
        }
        else if ("zones".equalsIgnoreCase(subElement.getName()))
        {
          for (Element e : subElement.elements())
          {
            if (zones.isEmpty())
            {
              zones = new HashMap<>();
            }
            boolean active = (e.attributeValue("active") != null) && Boolean.parseBoolean(e.attributeValue("active"));
            ZoneTemplate template = ZoneHolder.getInstance().getTemplate(e.attributeValue("name"));
            if (template == null)
            {
              error("Zone: " + e.attributeValue("name") + " not found; file: " + getCurrentFileName());
              continue;
            }
            zones.put(template.getName(), new InstantZone.ZoneInfo(template, active));
          }
        }
        else if ("add_parameters".equalsIgnoreCase(subElement.getName()))
        {
          for (Element e : subElement.elements())
View Full Code Here

Examples of lineage2.gameserver.templates.DoorTemplate

        doorSet.set("baseHpMax", doorElement.attributeValue("hp"));
        doorSet.set("basePDef", doorElement.attributeValue("pdef"));
        doorSet.set("baseMDef", doorElement.attributeValue("mdef"));
        doorSet.set("collision_height", (maxz - minz) & 0xfff0);
        doorSet.set("collision_radius", Math.max(50, Math.min(doorPos.x - shape.getXmin(), doorPos.y - shape.getYmin())));
        DoorTemplate template = new DoorTemplate(doorSet);
        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.