|
|
@ -84,9 +84,11 @@ public class Zone extends AbstractGameObject { |
|
|
|
this.minLvl = rs.getInt("minLvl"); |
|
|
|
this.minLvl = rs.getInt("minLvl"); |
|
|
|
this.maxLvl = rs.getInt("maxLvl"); |
|
|
|
this.maxLvl = rs.getInt("maxLvl"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setBounds(); |
|
|
|
|
|
|
|
|
|
|
|
//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)
|
|
|
|
Zone parentZone = ZoneManager.getZoneByUUID(parentZoneID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Zone parentZone = ZoneManager.getZoneByUUID(parentZoneID); |
|
|
|
this.setParent(parentZone); |
|
|
|
this.setParent(parentZone); |
|
|
|
|
|
|
|
|
|
|
|
if (this.minLvl == 0 && parentZone != null) { |
|
|
|
if (this.minLvl == 0 && parentZone != null) { |
|
|
@ -238,8 +240,6 @@ public class Zone extends AbstractGameObject { |
|
|
|
this.parent = value; |
|
|
|
this.parent = value; |
|
|
|
this.parentZoneID = (this.parent != null) ? this.parent.getObjectUUID() : 0; |
|
|
|
this.parentZoneID = (this.parent != null) ? this.parent.getObjectUUID() : 0; |
|
|
|
|
|
|
|
|
|
|
|
// Zone AABB is set here as it's coordinate space is world requiring a parent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Seafloor
|
|
|
|
// Seafloor
|
|
|
|
|
|
|
|
|
|
|
|
if (this.parent == null) { |
|
|
|
if (this.parent == null) { |
|
|
@ -247,7 +247,6 @@ public class Zone extends AbstractGameObject { |
|
|
|
this.absY = MBServerStatics.SEA_FLOOR_ALTITUDE; |
|
|
|
this.absY = MBServerStatics.SEA_FLOOR_ALTITUDE; |
|
|
|
this.absZ = this.zCoord; |
|
|
|
this.absZ = this.zCoord; |
|
|
|
this.seaLevel = 0; |
|
|
|
this.seaLevel = 0; |
|
|
|
this.setBounds(); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -262,8 +261,6 @@ public class Zone extends AbstractGameObject { |
|
|
|
|
|
|
|
|
|
|
|
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this); |
|
|
|
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this); |
|
|
|
|
|
|
|
|
|
|
|
this.setBounds(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.getParent() == null) { |
|
|
|
if (this.getParent() == null) { |
|
|
|
this.seaLevel = MBServerStatics.SEA_FLOOR_ALTITUDE; |
|
|
|
this.seaLevel = MBServerStatics.SEA_FLOOR_ALTITUDE; |
|
|
|
return; |
|
|
|
return; |
|
|
|