Package lineage2.commons.geometry

Examples of lineage2.commons.geometry.Shape.validate()


                Polygon poly = new Polygon();
                for (Location loc : coords)
                {
                  poly.add(loc.x, loc.y).setZmin(loc.z).setZmax(loc.z);
                }
                if (!poly.validate())
                {
                  error("invalid spawn territory for instance id : " + instanceId + " - " + poly + "!");
                }
                territory = new Territory().add(poly);
              }
View Full Code Here


                      int maxZ = Integer.parseInt(s2.getAttributes().getNamedItem("zmax").getNodeValue());
                      poly.add(x, y).setZmin(minZ).setZmax(maxZ);
                    }
                  }
                  territory = new Territory().add(poly);
                  if (!poly.validate())
                  {
                    _log.error("HellboundManager: Invalid spawn territory : " + poly + "!");
                    continue;
                  }
                }
View Full Code Here

            }
          }
          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)
            {
View Full Code Here

            territory.add(shape);
          }
          else if ("polygon".equalsIgnoreCase(n.getName()))
          {
            Polygon shape = ZoneParser.parsePolygon(n);
            if (!shape.validate())
            {
              error("RestartPointParser: invalid territory data : " + shape + "!");
            }
            if (territory == null)
            {
View Full Code Here

      int y = Integer.parseInt(addElement.attributeValue("y"));
      int zmin = Integer.parseInt(addElement.attributeValue("zmin"));
      int zmax = Integer.parseInt(addElement.attributeValue("zmax"));
      temp.add(x, y).setZmin(zmin).setZmax(zmax);
    }
    if (!temp.validate())
    {
      error("Invalid polygon: " + name + "{" + temp + "}. File: " + getCurrentFileName());
    }
    return temp;
  }
View Full Code Here

        {
          Element n = i.next();
          if ("polygon".equalsIgnoreCase(n.getName()))
          {
            Polygon shape = ZoneParser.parsePolygon(n);
            if (!shape.validate())
            {
              error("DomainParser: invalid territory data : " + shape + "!");
            }
            if (territory == null)
            {
View Full Code Here

            territory.add(shape);
          }
          else if ("polygon".equalsIgnoreCase(n.getName()))
          {
            Polygon shape = ZoneParser.parsePolygon(n);
            if (!shape.validate())
            {
              error("RestartPointParser: invalid territory data : " + shape + "!");
            }
            if (territory == null)
            {
View Full Code Here

            }
          }
          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)
            {
View Full Code Here

              list.add(g);
            }
          }
          if ((type == RewardType.RATED_GROUPED) || (type == RewardType.NOT_RATED_GROUPED))
          {
            if (!list.validate())
            {
              warn("Problems with rewardlist for npc: " + npcId + "; type: " + type);
            }
          }
          template.putRewardList(type, list);
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.