Examples of ZoneNPoly


Examples of com.l2jfrozen.gameserver.model.zone.form.ZoneNPoly

                          aX[i] = fl_x.get(i);
                          aY[i] = fl_y.get(i);
                        }
 
                        // Create the zone
                        temp.setZone(new ZoneNPoly(aX, aY, minZ, maxZ));
                      }
                      else
                      {
                        _log.warning("ZoneData: Bad sql data for zone: " + zoneId);
                        statement.close();
                        rset.close();
                        continue;
                      }
 
                      fl_x = null;
                    }
                    else
                    {
                      _log.warning("ZoneData: Unknown shape: " + zoneShape);
                      statement.close();
                      rset.close();
                      continue;
                    }
 
                    statement.close();
                    rset.close();
                    statement = null;
                    rset = null;
                  }
                  catch(Exception e)
                  {
                    if(Config.ENABLE_ALL_EXCEPTIONS)
                      e.printStackTrace();
                   
                   
                    _log.warning("ZoneData: Failed to load zone coordinates: " + e);
                  }

                }else{ //use file one
                 
                  // Create this zone. Parsing for cuboids is a
                  // bit different than for other polygons
                  // cuboids need exactly 2 points to be defined.
                  // Other polygons need at least 3 (one per
                  // vertex)
                  if (zoneShape.equalsIgnoreCase("Cuboid"))
                  {
                    if (coords.length == 2)
                      temp.setZone(new ZoneCuboid(coords[0][0], coords[1][0], coords[0][1], coords[1][1], minZ, maxZ));
                    else
                    {
                      _log.warning("ZoneData: Missing cuboid vertex in sql data for zone: " + zoneId);
                      continue;
                    }
                  }
                  else if (zoneShape.equalsIgnoreCase("NPoly"))
                  {
                    // nPoly needs to have at least 3 vertices
                    if (coords.length > 2)
                    {
                      final int[] aX = new int[coords.length];
                      final int[] aY = new int[coords.length];
                      for (int i = 0; i < coords.length; i++)
                      {
                        aX[i] = coords[i][0];
                        aY[i] = coords[i][1];
                      }
                      temp.setZone(new ZoneNPoly(aX, aY, minZ, maxZ));
                    }
                    else
                    {
                      _log.warning("ZoneData: Bad data for zone: " + zoneId);
                      continue;
View Full Code Here

Examples of net.sf.l2j.gameserver.model.zone.form.ZoneNPoly

 
                    // This runs only at server startup so dont complain :>
                    for (int i=0; i < fl_x.size(); i++) { aX[i] = fl_x.get(i); aY[i] = fl_y.get(i); }
 
                    // Create the zone
                    temp.setZone(new ZoneNPoly(aX, aY, minZ, maxZ));
                  }
                  else
                  {
                    _log.warning("ZoneData: Bad sql data for zone: "+zoneId);
                    rset.close();
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.