forked from MagicBane/Server
Inlined empty getters
This commit is contained in:
+25
-104
@@ -33,31 +33,31 @@ public class Zone extends AbstractGameObject {
|
||||
public final Set<Building> zoneBuildingSet = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public final Set<NPC> zoneNPCSet = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public final Set<Mob> zoneMobSet = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
private final int playerCityID;
|
||||
private final String zoneName;
|
||||
private final float xCoord;
|
||||
private final float zCoord;
|
||||
private final float yCoord;
|
||||
private final int loadNum;
|
||||
private final byte safeZone;
|
||||
private final String Icon1;
|
||||
private final String Icon2;
|
||||
private final String Icon3;
|
||||
public final int playerCityID;
|
||||
public final String zoneName;
|
||||
public final float xCoord;
|
||||
public final float zCoord;
|
||||
public final float yCoord;
|
||||
public final int loadNum;
|
||||
public final byte peaceZone;
|
||||
public final String Icon1;
|
||||
public final String Icon2;
|
||||
public final String Icon3;
|
||||
public float absX = 0.0f;
|
||||
public float absY = 0.0f;
|
||||
public float absZ = 0.0f;
|
||||
public int minLvl;
|
||||
public int maxLvl;
|
||||
public boolean hasBeenHotzone = false;
|
||||
private ArrayList<Zone> nodes = null;
|
||||
private int parentZoneID;
|
||||
private Zone parent = null;
|
||||
private Bounds bounds;
|
||||
private boolean isNPCCity = false;
|
||||
private boolean isPlayerCity = false;
|
||||
private String hash;
|
||||
public ArrayList<Zone> nodes = null;
|
||||
public int parentZoneID;
|
||||
public Zone parent = null;
|
||||
public Bounds bounds;
|
||||
public boolean isNPCCity = false;
|
||||
public boolean isPlayerCity = false;
|
||||
public String hash;
|
||||
public float worldAltitude = 0;
|
||||
private float seaLevel = 0f;
|
||||
public float seaLevel = 0f;
|
||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public static long lastRespawn = 0;
|
||||
public Bounds maxBlend;
|
||||
@@ -75,7 +75,7 @@ public class Zone extends AbstractGameObject {
|
||||
this.zCoord = rs.getFloat("ZCoord");
|
||||
this.yCoord = rs.getFloat("YOffset");
|
||||
this.loadNum = rs.getInt("LoadNum");
|
||||
this.safeZone = rs.getByte("SafeZone");
|
||||
this.peaceZone = rs.getByte("SafeZone");
|
||||
this.Icon1 = rs.getString("Icon1");
|
||||
this.Icon2 = rs.getString("Icon2");
|
||||
this.Icon3 = rs.getString("Icon3");
|
||||
@@ -147,7 +147,7 @@ public class Zone extends AbstractGameObject {
|
||||
writer.putString(city.getCityName());
|
||||
else
|
||||
writer.putString(zone.zoneName);
|
||||
writer.put(zone.safeZone);
|
||||
writer.put(zone.peaceZone);
|
||||
writer.putString(zone.Icon1);
|
||||
writer.putString(zone.Icon2);
|
||||
writer.putString(zone.Icon3);
|
||||
@@ -182,50 +182,14 @@ public class Zone extends AbstractGameObject {
|
||||
// Set heightmap blending bounds
|
||||
|
||||
if (heightMap == null) {
|
||||
this.maxBlend = this.getBounds();
|
||||
this.maxBlend = bounds;
|
||||
} else {
|
||||
this.maxBlend = Bounds.borrow();
|
||||
this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), this.getBounds().getHalfExtents().subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f);
|
||||
this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), bounds.getHalfExtents().subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getPlayerCityUUID() {
|
||||
return this.playerCityID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return zoneName;
|
||||
}
|
||||
|
||||
public float getXCoord() {
|
||||
return xCoord;
|
||||
}
|
||||
|
||||
public float getYCoord() {
|
||||
return yCoord;
|
||||
}
|
||||
|
||||
public float getZCoord() {
|
||||
return zCoord;
|
||||
}
|
||||
|
||||
public int getLoadNum() {
|
||||
return loadNum;
|
||||
}
|
||||
|
||||
public byte getSafeZone() {
|
||||
return safeZone;
|
||||
}
|
||||
|
||||
public String getIcon1() {
|
||||
return Icon1;
|
||||
}
|
||||
|
||||
public Zone getParent() {
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
public void setParent(final Zone value) {
|
||||
|
||||
this.parent = value;
|
||||
@@ -254,7 +218,7 @@ public class Zone extends AbstractGameObject {
|
||||
this.setBounds();
|
||||
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this);
|
||||
|
||||
if (this.getParent() == null) {
|
||||
if (this.parent == null) {
|
||||
this.seaLevel = MBServerStatics.SEA_FLOOR_ALTITUDE;
|
||||
return;
|
||||
}
|
||||
@@ -271,18 +235,6 @@ public class Zone extends AbstractGameObject {
|
||||
|
||||
}
|
||||
|
||||
public float getAbsX() {
|
||||
return this.absX;
|
||||
}
|
||||
|
||||
public float getAbsY() {
|
||||
return this.absY;
|
||||
}
|
||||
|
||||
public float getAbsZ() {
|
||||
return this.absZ;
|
||||
}
|
||||
|
||||
public boolean isMacroZone() {
|
||||
|
||||
// Macro zones have icons.
|
||||
@@ -293,23 +245,7 @@ public class Zone extends AbstractGameObject {
|
||||
if (this.parent == null)
|
||||
return false;
|
||||
|
||||
return !this.getIcon1().equals("");
|
||||
}
|
||||
|
||||
public boolean isNPCCity() {
|
||||
return this.isNPCCity;
|
||||
}
|
||||
|
||||
public void setNPCCity(boolean value) {
|
||||
this.isNPCCity = value;
|
||||
}
|
||||
|
||||
public boolean isPlayerCity() {
|
||||
return this.isPlayerCity;
|
||||
}
|
||||
|
||||
public void setPlayerCity(boolean value) {
|
||||
this.isPlayerCity = value;
|
||||
return !Icon1.equals("");
|
||||
}
|
||||
|
||||
public Vector3fImmutable getLoc() {
|
||||
@@ -358,21 +294,10 @@ public class Zone extends AbstractGameObject {
|
||||
if (this.getNodes().get(0).isMacroZone())
|
||||
return true;
|
||||
|
||||
return this.getParent().equals(ZoneManager.getSeaFloor());
|
||||
return this.parent.equals(ZoneManager.getSeaFloor());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the bounds
|
||||
*/
|
||||
public Bounds getBounds() {
|
||||
return bounds;
|
||||
}
|
||||
|
||||
public String getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void setHash() {
|
||||
|
||||
this.hash = DataWarehouse.hasher.encrypt(this.getObjectUUID());
|
||||
@@ -392,8 +317,4 @@ public class Zone extends AbstractGameObject {
|
||||
return HeightMap.heightmapByLoadNum.get(this.loadNum);
|
||||
}
|
||||
|
||||
public float getSeaLevel() {
|
||||
return seaLevel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user