Inlined empty getters
This commit is contained in:
@@ -78,7 +78,7 @@ public class AddMobCmd extends AbstractDevCmd {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zone.isPlayerCity()) {
|
||||
if (zone.isPlayerCity) {
|
||||
throwbackError(pc, "Cannot use ./mob on Player cities. Try ./servermob instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ public class AuditMobsCmd extends AbstractDevCmd {
|
||||
|
||||
if (size >= count) {
|
||||
plusplus++;
|
||||
throwbackInfo(pcSender, zoneMicro.getName() + " at location " + zoneMicro.getLoc().toString() + " has " + size + " mobs. ");
|
||||
System.out.println(zoneMicro.getName() + " at location " + zoneMicro.getLoc().toString() + " has " + size + " mobs. ");
|
||||
throwbackInfo(pcSender, zoneMicro.zoneName + " at location " + zoneMicro.getLoc().toString() + " has " + size + " mobs. ");
|
||||
System.out.println(zoneMicro.zoneName + " at location " + zoneMicro.getLoc().toString() + " has " + size + " mobs. ");
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AuditMobsCmd extends AbstractDevCmd {
|
||||
//ConcurrentHashMap<Mob, Long> respawnMap = Mob.getRespawnMap();
|
||||
// ConcurrentHashMap<Mob, Long> despawnMap = Mob.getDespawnMap();
|
||||
|
||||
throwbackInfo(pcSender, zone.getName() + ", numMobs: " + zone.zoneMobSet.size());
|
||||
throwbackInfo(pcSender, zone.zoneName + ", numMobs: " + zone.zoneMobSet.size());
|
||||
throwbackInfo(pcSender, "UUID, dbID, inRespawnMap, isAlive, activeAI, Loc");
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GetHeightCmd extends AbstractDevCmd {
|
||||
|
||||
currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
|
||||
heightmapZone = HeightMap.getNextZoneWithTerrain(currentZone);
|
||||
parentZone = HeightMap.getNextZoneWithTerrain(currentZone.getParent());
|
||||
parentZone = HeightMap.getNextZoneWithTerrain(currentZone.parent);
|
||||
|
||||
float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc());
|
||||
float parentHeight = HeightMap.getWorldHeight(parentZone, playerCharacter.getLoc());
|
||||
@@ -42,17 +42,17 @@ public class GetHeightCmd extends AbstractDevCmd {
|
||||
Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), heightmapZone);
|
||||
Vector2f gridSquare = heightmapZone.getHeightMap().getGridSquare(zoneLoc);
|
||||
|
||||
this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.getName());
|
||||
this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.getName());
|
||||
this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.zoneName);
|
||||
this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.zoneName);
|
||||
this.throwbackInfo(playerCharacter, "Zone Height: " + heightmapZone.worldAltitude);
|
||||
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.getSeaLevel());
|
||||
this.throwbackInfo(playerCharacter, "Drowning Height: " + (heightmapZone.getSeaLevel() + playerCharacter.getCharacterHeight()));
|
||||
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.seaLevel);
|
||||
this.throwbackInfo(playerCharacter, "Drowning Height: " + (heightmapZone.seaLevel + playerCharacter.getCharacterHeight()));
|
||||
this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y);
|
||||
this.throwbackInfo(playerCharacter, "*** 256: " + currentHeight);
|
||||
this.throwbackInfo(playerCharacter, "***Adjusted Height: " + (currentHeight + playerCharacter.getCharacterHeight()));
|
||||
|
||||
this.throwbackInfo(playerCharacter, "------------");
|
||||
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.getName());
|
||||
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.zoneName);
|
||||
this.throwbackInfo(playerCharacter, "Height returned : " + parentHeight);
|
||||
this.throwbackInfo(playerCharacter, "------------");
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GetOffsetCmd extends AbstractDevCmd {
|
||||
float difY = pcSender.getLoc().y - zone.absY;
|
||||
float difZ = pcSender.getLoc().z - zone.absZ;
|
||||
|
||||
throwbackInfo(pcSender, zone.getName() + ": (x: " + difX + ", y: " + difY + ", z: " + difZ + ')');
|
||||
throwbackInfo(pcSender, zone.zoneName + ": (x: " + difX + ", y: " + difY + ", z: " + difZ + ')');
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class GetZoneCmd extends AbstractDevCmd {
|
||||
}
|
||||
|
||||
for (Zone zone : allIn)
|
||||
throwbackInfo(pcSender, zone.getName() + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.getLoadNum());
|
||||
throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.loadNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -81,7 +81,7 @@ public class GotoCmd extends AbstractDevCmd {
|
||||
continue;
|
||||
Zone zone = city.getParent();
|
||||
if (zone != null) {
|
||||
if (zone.isNPCCity() || zone.isPlayerCity())
|
||||
if (zone.isNPCCity || zone.isPlayerCity)
|
||||
loc = Vector3fImmutable.getRandomPointOnCircle(zone.getLoc(), MBServerStatics.TREE_TELEPORT_RADIUS);
|
||||
else
|
||||
loc = zone.getLoc();
|
||||
@@ -97,10 +97,10 @@ public class GotoCmd extends AbstractDevCmd {
|
||||
Zone zone = (Zone) zoneAgo;
|
||||
if (zone == null)
|
||||
continue;
|
||||
if (!zone.getName().equalsIgnoreCase(cityName))
|
||||
if (!zone.zoneName.equalsIgnoreCase(cityName))
|
||||
continue;
|
||||
if (zone != null) {
|
||||
if (zone.isNPCCity() || zone.isPlayerCity())
|
||||
if (zone.isNPCCity || zone.isPlayerCity)
|
||||
loc = Vector3fImmutable.getRandomPointOnCircle(zone.getLoc(), MBServerStatics.TREE_TELEPORT_RADIUS);
|
||||
else
|
||||
loc = zone.getLoc();
|
||||
|
||||
@@ -40,7 +40,7 @@ public class HotzoneCmd extends AbstractDevCmd {
|
||||
String input = data.toString().trim();
|
||||
|
||||
if (input.length() == 0) {
|
||||
outString = "Current hotZone: " + ZoneManager.hotZone.getName() + "\r\n";
|
||||
outString = "Current hotZone: " + ZoneManager.hotZone.zoneName + "\r\n";
|
||||
outString += "Available hotZones: " + ZoneManager.availableHotZones();
|
||||
throwbackInfo(playerCharacter, outString);
|
||||
return;
|
||||
@@ -48,7 +48,7 @@ public class HotzoneCmd extends AbstractDevCmd {
|
||||
|
||||
if (input.equalsIgnoreCase("random")) {
|
||||
ZoneManager.generateAndSetRandomHotzone();
|
||||
outString = "New hotZone: " + ZoneManager.hotZone.getName() + "\r\n";
|
||||
outString = "New hotZone: " + ZoneManager.hotZone.zoneName + "\r\n";
|
||||
outString += "Available hotZones: " + ZoneManager.availableHotZones();
|
||||
throwbackInfo(playerCharacter, outString);
|
||||
return;
|
||||
|
||||
@@ -387,7 +387,7 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += newline;
|
||||
output += "EquipSet: " + targetNPC.getEquipmentSetID();
|
||||
output += newline;
|
||||
output += "Parent Zone LoadNum : " + targetNPC.getParentZone().getLoadNum();
|
||||
output += "Parent Zone LoadNum : " + targetNPC.getParentZone().loadNum;
|
||||
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += "EquipSet: " + targetMob.equipmentSetID;
|
||||
output += newline;
|
||||
try {
|
||||
output += "Parent Zone LoadNum : " + targetMob.getParentZone().getLoadNum();
|
||||
output += "Parent Zone LoadNum : " + targetMob.getParentZone().loadNum;
|
||||
} catch (Exception ex) {
|
||||
//who cares
|
||||
}
|
||||
|
||||
@@ -111,12 +111,12 @@ public class MakeBaneCmd extends AbstractDevCmd {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!zone.isPlayerCity()) {
|
||||
if (!zone.isPlayerCity) {
|
||||
throwbackError(pc, "This is not a player city.");
|
||||
return;
|
||||
}
|
||||
|
||||
City city = City.getCity(zone.getPlayerCityUUID());
|
||||
City city = City.getCity(zone.playerCityID);
|
||||
if (city == null) {
|
||||
throwbackError(pc, "Unable to find the city associated with this zone.");
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd {
|
||||
|
||||
private static void PurgeWalls(Zone zone, PlayerCharacter pc) {
|
||||
|
||||
if (!zone.isPlayerCity())
|
||||
if (!zone.isPlayerCity)
|
||||
return;
|
||||
|
||||
for (Building building : zone.zoneBuildingSet) {
|
||||
|
||||
@@ -60,12 +60,12 @@ public class RealmInfoCmd extends AbstractDevCmd {
|
||||
outString += ")";
|
||||
outString += newline;
|
||||
|
||||
outString += " Zone: " + serverZone.getName();
|
||||
outString += " Zone: " + serverZone.zoneName;
|
||||
|
||||
outString += newline;
|
||||
|
||||
if (serverZone.getParent() != null)
|
||||
outString += " Parent: " + serverZone.getParent().getName();
|
||||
if (serverZone.parent != null)
|
||||
outString += " Parent: " + serverZone.parent.zoneName;
|
||||
else
|
||||
outString += "Parent: NONE";
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ public class RemoveBaneCmd extends AbstractDevCmd {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!zone.isPlayerCity()) {
|
||||
if (!zone.isPlayerCity) {
|
||||
throwbackError(pc, "This is not a player city.");
|
||||
return;
|
||||
}
|
||||
|
||||
City city = City.getCity(zone.getPlayerCityUUID());
|
||||
City city = City.getCity(zone.playerCityID);
|
||||
if (city == null) {
|
||||
throwbackError(pc, "Unable to find the city associated with this zone.");
|
||||
return;
|
||||
|
||||
@@ -130,7 +130,7 @@ public class RemoveObjectCmd extends AbstractDevCmd {
|
||||
building.disableSpire(false);
|
||||
|
||||
if ((building.getBlueprint() != null) && (building.getBlueprint().getBuildingGroup() == BuildingGroup.WAREHOUSE)) {
|
||||
City city = City.getCity(building.getParentZone().getPlayerCityUUID());
|
||||
City city = City.getCity(building.getParentZone().playerCityID);
|
||||
if (city != null) {
|
||||
city.setWarehouseBuildingID(0);
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ public class SeaAuditCmd extends AbstractDevCmd {
|
||||
AbstractGameObject target) {
|
||||
|
||||
for (Zone zone : ZoneManager.getAllZones())
|
||||
if (zone.getSeaLevel() > zone.worldAltitude)
|
||||
this.throwbackInfo(playerCharacter, zone.getObjectUUID() + zone.getName());
|
||||
if (zone.seaLevel > zone.worldAltitude)
|
||||
this.throwbackInfo(playerCharacter, zone.getObjectUUID() + zone.zoneName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,12 +41,12 @@ public class SetBaneActiveCmd extends AbstractDevCmd {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!zone.isPlayerCity()) {
|
||||
if (!zone.isPlayerCity) {
|
||||
throwbackError(pc, "This is not a player city.");
|
||||
return;
|
||||
}
|
||||
|
||||
City city = City.getCity(zone.getPlayerCityUUID());
|
||||
City city = City.getCity(zone.playerCityID);
|
||||
if (city == null) {
|
||||
throwbackError(pc, "Unable to find the city associated with this zone.");
|
||||
return;
|
||||
|
||||
@@ -31,9 +31,9 @@ public class SetForceRenameCityCmd extends AbstractDevCmd {
|
||||
if (zone == null)
|
||||
return;
|
||||
boolean rename = words[0].equalsIgnoreCase("true") ? true : false;
|
||||
if (zone.getPlayerCityUUID() == 0)
|
||||
if (zone.playerCityID == 0)
|
||||
return;
|
||||
City city = City.getCity(zone.getPlayerCityUUID());
|
||||
City city = City.getCity(zone.playerCityID);
|
||||
if (city == null)
|
||||
return;
|
||||
city.setForceRename(rename);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class SummonCmd extends AbstractDevCmd {
|
||||
Zone zone = ZoneManager.findSmallestZone(pc.getLoc());
|
||||
String location = "Somewhere";
|
||||
if (zone != null)
|
||||
location = zone.getName();
|
||||
location = zone.zoneName;
|
||||
RecvSummonsRequestMsg rsrm = new RecvSummonsRequestMsg(pc.getObjectType().ordinal(), pc.getObjectUUID(), pc.getFirstName(),
|
||||
location, false);
|
||||
toSummon.getClientConnection().sendMsg(rsrm);
|
||||
|
||||
@@ -73,21 +73,21 @@ public class ZoneInfoCmd extends AbstractDevCmd {
|
||||
output = "Target Information:" + newline;
|
||||
output += StringUtils.addWS("UUID: " + objectUUID, 20);
|
||||
output += newline;
|
||||
output += "name: " + zone.getName();
|
||||
output += "name: " + zone.zoneName;
|
||||
output += newline;
|
||||
output += "loadNum: " + zone.getLoadNum();
|
||||
if (zone.getParent() != null) {
|
||||
output += StringUtils.addWS(", parent: " + zone.getParent().getObjectUUID(), 30);
|
||||
output += "Parentabs: x: " + zone.getParent().getAbsX() + ", y: " + zone.getParent().getAbsY() + ", z: " + zone.getParent().getAbsZ();
|
||||
output += "loadNum: " + zone.loadNum;
|
||||
if (zone.parent != null) {
|
||||
output += StringUtils.addWS(", parent: " + zone.parent.getObjectUUID(), 30);
|
||||
output += "Parentabs: x: " + zone.parent.absX + ", y: " + zone.parent.absY + ", z: " + zone.parent.absZ;
|
||||
|
||||
} else
|
||||
output += StringUtils.addWS(", parent: none", 30);
|
||||
output += newline;
|
||||
output += "absLoc: x: " + zone.getAbsX() + ", y: " + zone.getAbsY() + ", z: " + zone.getAbsZ();
|
||||
output += "absLoc: x: " + zone.absX + ", y: " + zone.absY + ", z: " + zone.absZ;
|
||||
output += newline;
|
||||
output += "offset: x: " + zone.getXCoord() + ", y: " + zone.getYCoord() + ", z: " + zone.getZCoord();
|
||||
output += "offset: x: " + zone.xCoord + ", y: " + zone.yCoord + ", z: " + zone.zCoord;
|
||||
output += newline;
|
||||
output += "radius: x: " + zone.getBounds().getHalfExtents().x + ", z: " + zone.getBounds().getHalfExtents().y;
|
||||
output += "radius: x: " + zone.bounds.getHalfExtents().x + ", z: " + zone.bounds.getHalfExtents().y;
|
||||
output += newline;
|
||||
|
||||
if (zone.getHeightMap() != null) {
|
||||
@@ -98,11 +98,11 @@ public class ZoneInfoCmd extends AbstractDevCmd {
|
||||
output += "Bucket Width Y : " + zone.getHeightMap().bucketWidthY;
|
||||
|
||||
}
|
||||
output += "radius: x: " + zone.getBounds().getHalfExtents().x + ", z: " + zone.getBounds().getHalfExtents().y;
|
||||
output += "radius: x: " + zone.bounds.getHalfExtents().x + ", z: " + zone.bounds.getHalfExtents().y;
|
||||
output += newline;
|
||||
// output += "minLvl = " + zone.getMinLvl() + " | maxLvl = " + zone.getMaxLvl();
|
||||
output += newline;
|
||||
output += "Sea Level = " + zone.getSeaLevel();
|
||||
output += "Sea Level = " + zone.seaLevel;
|
||||
output += newline;
|
||||
output += "World Altitude = " + zone.worldAltitude;
|
||||
throwbackInfo(player, output);
|
||||
@@ -110,7 +110,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
|
||||
City city = ZoneManager.getCityAtLocation(player.getLoc());
|
||||
|
||||
output += newline;
|
||||
output += (city == null) ? "None" : city.getParent().getName();
|
||||
output += (city == null) ? "None" : city.getParent().zoneName;
|
||||
|
||||
if (city != null) {
|
||||
|
||||
@@ -130,7 +130,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
|
||||
|
||||
for (Zone child : nodes) {
|
||||
output += newline;
|
||||
output += child.getName() + " (" + child.getLoadNum() + ')';
|
||||
output += child.zoneName + " (" + child.loadNum + ')';
|
||||
}
|
||||
}
|
||||
throwbackInfo(player, output);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ZoneSetCmd extends AbstractDevCmd {
|
||||
|
||||
zone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
|
||||
|
||||
throwbackInfo(playerCharacter, zone.getName() + " (" + zone.getLoadNum() + ") " + zone.getObjectUUID());
|
||||
throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.loadNum + ") " + zone.getObjectUUID());
|
||||
|
||||
// NPC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user