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");
}