Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2RoundTerritory


{
  public ObeliskInstance(int objectId, L2NpcTemplate template)
  {
    super(objectId, template);
    int id = IdFactory.getInstance().getNextId();
    L2Territory pos = new L2RoundTerritory(id, -245825, 217075, 230, -12208, -12000);
    setGeoPos(pos);
    GeoEngine.applyControl(this);
  }
View Full Code Here


        int terr = rset.getInt("loc_id");
        if(rset.getInt("radius") > 0)
        {
          if(_locations.get(terr) == null)
          {
            L2RoundTerritory t = new L2RoundTerritory(terr, rset.getInt("loc_x"), rset.getInt("loc_y"), rset.getInt("radius"), rset.getInt("loc_zmin"), rset.getInt("loc_zmax"));
            _locations.put(terr, t);
          }
        }
        else
        {
          if(_locations.get(terr) == null)
          {
            L2Territory t = new L2Territory(terr);
            _locations.put(terr, t);
          }
          _locations.get(terr).add(rset.getInt("loc_x"), rset.getInt("loc_y"), rset.getInt("loc_zmin"), rset.getInt("loc_zmax"));
        }
      }
    }
    catch(Exception e1)
    {
      //problem with initializing spawn, go to next one
      _log.warning("locations couldnt be initialized:" + e1);
    }
    finally
    {
      DatabaseUtils.closeDatabaseCSR(con, statement, rset);
    }
    for(L2Territory t : _locations.values())
    {
      t.validate();
    }
    _log.info("TerritoryTable: Loaded " + _locations.size() + " locations");
  }
View Full Code Here

                if(isRound)
                {
                  String[] coord = XMLUtil.getAttributeValue(e, "loc").replaceAll(",", " ").replaceAll(";", " ").replaceAll("  ", " ").trim().split(" ");
                  if(coord.length < 5) // Не указаны minZ и maxZ, берем граничные значения
                  {
                    territory = new L2RoundTerritory(locId, Integer.parseInt(coord[0]), Integer.parseInt(coord[1]), Integer.parseInt(coord[2]), Integer.MIN_VALUE, Integer.MAX_VALUE);
                  }
                  else
                  {
                    territory = new L2RoundTerritory(locId, Integer.parseInt(coord[0]), Integer.parseInt(coord[1]), Integer.parseInt(coord[2]), Integer.parseInt(coord[3]), Integer.parseInt(coord[4]));
                  }
                }
                else
                {
                  territory = new L2Territory(locId);
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2RoundTerritory

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.