|
|
@ -40,14 +40,14 @@ public class Zone extends AbstractGameObject { |
|
|
|
public final float yOffset; |
|
|
|
public final float yOffset; |
|
|
|
public final int template; |
|
|
|
public final int template; |
|
|
|
public final byte peace_zone; |
|
|
|
public final byte peace_zone; |
|
|
|
public final String Icon1; |
|
|
|
public final String icon1; |
|
|
|
public final String Icon2; |
|
|
|
public final String icon2; |
|
|
|
public final String Icon3; |
|
|
|
public final String icon3; |
|
|
|
public float absX = 0.0f; |
|
|
|
public float absX = 0.0f; |
|
|
|
public float absY = 0.0f; |
|
|
|
public float absY = 0.0f; |
|
|
|
public float absZ = 0.0f; |
|
|
|
public float absZ = 0.0f; |
|
|
|
public int minLvl; |
|
|
|
public int min_level; |
|
|
|
public int maxLvl; |
|
|
|
public int max_level; |
|
|
|
public boolean hasBeenHotzone = false; |
|
|
|
public boolean hasBeenHotzone = false; |
|
|
|
public ArrayList<Zone> nodes = null; |
|
|
|
public ArrayList<Zone> nodes = null; |
|
|
|
public int parentZoneID; |
|
|
|
public int parentZoneID; |
|
|
@ -76,11 +76,11 @@ public class Zone extends AbstractGameObject { |
|
|
|
this.yOffset = rs.getFloat("yOffset"); |
|
|
|
this.yOffset = rs.getFloat("yOffset"); |
|
|
|
this.template = rs.getInt("template"); |
|
|
|
this.template = rs.getInt("template"); |
|
|
|
this.peace_zone = rs.getByte("peace_zone"); |
|
|
|
this.peace_zone = rs.getByte("peace_zone"); |
|
|
|
this.Icon1 = rs.getString("icon1"); |
|
|
|
this.icon1 = rs.getString("icon1"); |
|
|
|
this.Icon2 = rs.getString("icon2"); |
|
|
|
this.icon2 = rs.getString("icon2"); |
|
|
|
this.Icon3 = rs.getString("icon3"); |
|
|
|
this.icon3 = rs.getString("icon3"); |
|
|
|
this.minLvl = rs.getInt("min_level"); |
|
|
|
this.min_level = rs.getInt("min_level"); |
|
|
|
this.maxLvl = rs.getInt("max_level"); |
|
|
|
this.max_level = rs.getInt("max_level"); |
|
|
|
this.hash = rs.getString("hash"); |
|
|
|
this.hash = rs.getString("hash"); |
|
|
|
|
|
|
|
|
|
|
|
//this needs to be here specifically for new zones created after server boot (e.g. player city zones)
|
|
|
|
//this needs to be here specifically for new zones created after server boot (e.g. player city zones)
|
|
|
@ -88,9 +88,9 @@ public class Zone extends AbstractGameObject { |
|
|
|
Zone parentZone = ZoneManager.getZoneByUUID(parentZoneID); |
|
|
|
Zone parentZone = ZoneManager.getZoneByUUID(parentZoneID); |
|
|
|
this.setParent(parentZone); |
|
|
|
this.setParent(parentZone); |
|
|
|
|
|
|
|
|
|
|
|
if (this.minLvl == 0 && parentZone != null) { |
|
|
|
if (this.min_level == 0 && parentZone != null) { |
|
|
|
this.minLvl = parentZone.minLvl; |
|
|
|
this.min_level = parentZone.min_level; |
|
|
|
this.maxLvl = parentZone.maxLvl; |
|
|
|
this.max_level = parentZone.max_level; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (parentZone != null) |
|
|
|
if (parentZone != null) |
|
|
@ -147,9 +147,9 @@ public class Zone extends AbstractGameObject { |
|
|
|
else |
|
|
|
else |
|
|
|
writer.putString(zone.zoneName); |
|
|
|
writer.putString(zone.zoneName); |
|
|
|
writer.put(zone.peace_zone); |
|
|
|
writer.put(zone.peace_zone); |
|
|
|
writer.putString(zone.Icon1); |
|
|
|
writer.putString(zone.icon1); |
|
|
|
writer.putString(zone.Icon2); |
|
|
|
writer.putString(zone.icon2); |
|
|
|
writer.putString(zone.Icon3); |
|
|
|
writer.putString(zone.icon3); |
|
|
|
writer.put((byte) 0); // Pad
|
|
|
|
writer.put((byte) 0); // Pad
|
|
|
|
|
|
|
|
|
|
|
|
for (Zone child : zone.nodes) { |
|
|
|
for (Zone child : zone.nodes) { |
|
|
@ -209,9 +209,9 @@ public class Zone extends AbstractGameObject { |
|
|
|
this.absY = this.yOffset + parent.absY; |
|
|
|
this.absY = this.yOffset + parent.absY; |
|
|
|
this.absZ = this.zOffset + parent.absZ; |
|
|
|
this.absZ = this.zOffset + parent.absZ; |
|
|
|
|
|
|
|
|
|
|
|
if (this.minLvl == 0 || this.maxLvl == 0) { |
|
|
|
if (this.min_level == 0 || this.max_level == 0) { |
|
|
|
this.minLvl = this.parent.minLvl; |
|
|
|
this.min_level = this.parent.min_level; |
|
|
|
this.maxLvl = this.parent.maxLvl; |
|
|
|
this.max_level = this.parent.max_level; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.setBounds(); |
|
|
|
this.setBounds(); |
|
|
@ -244,7 +244,7 @@ public class Zone extends AbstractGameObject { |
|
|
|
if (this.parent == null) |
|
|
|
if (this.parent == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
return !Icon1.equals(""); |
|
|
|
return !icon1.equals(""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Vector3fImmutable getLoc() { |
|
|
|
public Vector3fImmutable getLoc() { |
|
|
|