Package lineage2.commons.geometry

Examples of lineage2.commons.geometry.Rectangle


    if (coord.length > 2)
    {
      zmin = Integer.parseInt(coord[2]);
      zmax = Integer.parseInt(coord[3]);
    }
    Rectangle rectangle = new Rectangle(x1, y1, x2, y2);
    rectangle.setZmin(zmin);
    rectangle.setZmax(zmax);
    return rectangle;
  }
View Full Code Here


        for (Iterator<Element> i = listElement.elementIterator(); i.hasNext();)
        {
          Element n = i.next();
          if ("region".equalsIgnoreCase(n.getName()))
          {
            Rectangle shape;
            Attribute map = n.attribute("map");
            String s = map.getValue();
            String val[] = s.split("_");
            int rx = Integer.parseInt(val[0]);
            int ry = Integer.parseInt(val[1]);
            int x1 = World.MAP_MIN_X + ((rx - Config.GEO_X_FIRST) << 15);
            int y1 = World.MAP_MIN_Y + ((ry - Config.GEO_Y_FIRST) << 15);
            int x2 = (x1 + (1 << 15)) - 1;
            int y2 = (y1 + (1 << 15)) - 1;
            shape = new Rectangle(x1, y1, x2, y2);
            shape.setZmin(World.MAP_MIN_Z);
            shape.setZmax(World.MAP_MAX_Z);
            if (territory == null)
            {
              territory = new Territory();
            }
            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

                      xMax = Integer.parseInt(attrs.getNamedItem("xMax").getNodeValue());
                      yMin = Integer.parseInt(attrs.getNamedItem("yMin").getNodeValue());
                      yMax = Integer.parseInt(attrs.getNamedItem("yMax").getNodeValue());
                      zMin = Integer.parseInt(attrs.getNamedItem("zMin").getNodeValue());
                      zMax = Integer.parseInt(attrs.getNamedItem("zMax").getNodeValue());
                      territory = new Territory().add(new Rectangle(xMin, yMin, xMax, yMax).setZmin(zMin).setZmax(zMax));
                    }
                  }
                  if (territory == null)
                  {
                    _log.error("DimensionalRiftManager: invalid spawn data for room id " + roomId + "!");
View Full Code Here

  public void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    super.onEvtDead(killer);
    actor.deleteMe();
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
View Full Code Here

          getZone("[soi_hos_attack_attackup_5]").setActive(false);
          spawnRoom(6);
        }
      }
      else if(self.getNpcId() == Yehan)
        ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            spawnRoom(7);
            setReenterTime(System.currentTimeMillis());
View Full Code Here

   * @param time String
   * @param shutdownMode int
   */
  public void schedule(String time, int shutdownMode)
  {
    SchedulingPattern cronTime;
    try
    {
      cronTime = new SchedulingPattern(time);
    }
    catch (InvalidPatternException e)
    {
      return;
    }
    int seconds = (int) ((cronTime.next(System.currentTimeMillis()) / 1000L) - (System.currentTimeMillis() / 1000L));
    schedule(seconds, shutdownMode);
  }
View Full Code Here

  {
    _instance = this;
    _serverStarted = time();
    _listeners = new GameServerListenerList();
    new File("./log/").mkdir();
    version = new Version(GameServer.class);
    _log.info("=================================================");
    _log.info("Revision: ................ " + version.getRevisionNumber());
    _log.info("Build date: .............. " + version.getBuildDate());
    _log.info("Compiler version: ........ " + version.getBuildJdk());
    _log.info("=================================================");
View Full Code Here

    {
      synchronized (this)
      {
        if (_ai == null)
        {
          _ai = new ClonePlayerAI(this);
        }
      }
    }
    return (ClonePlayerAI) _ai;
  }
View Full Code Here

    }
    catch (Exception e)
    {
      _log.error("Unable to create ai of doorId " + _id, e);
    }
    return new DoorAI(door);
  }
View Full Code Here

   * Constructor for UserCommandHandler.
   */
  private UserCommandHandler()
  {
    registerUserCommandHandler(new ClanWarsList());
    registerUserCommandHandler(new ClanPenalty());
    registerUserCommandHandler(new CommandChannel());
    registerUserCommandHandler(new Escape());
    registerUserCommandHandler(new Loc());
    registerUserCommandHandler(new MyBirthday());
    registerUserCommandHandler(new OlympiadStat());
View Full Code Here

TOP

Related Classes of lineage2.commons.geometry.Rectangle

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.