Browse Source

Inlined empty getters

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
46b3db033b
  1. 2
      src/engine/Enum.java
  2. 19
      src/engine/InterestManagement/HeightMap.java
  3. 2
      src/engine/db/archive/CityRecord.java
  4. 2
      src/engine/db/archive/MineRecord.java
  5. 2
      src/engine/db/archive/PvpRecord.java
  6. 12
      src/engine/db/handlers/dbZoneHandler.java
  7. 2
      src/engine/devcmd/cmds/AddMobCmd.java
  8. 6
      src/engine/devcmd/cmds/AuditMobsCmd.java
  9. 12
      src/engine/devcmd/cmds/GetHeightCmd.java
  10. 2
      src/engine/devcmd/cmds/GetOffsetCmd.java
  11. 2
      src/engine/devcmd/cmds/GetZoneCmd.java
  12. 6
      src/engine/devcmd/cmds/GotoCmd.java
  13. 4
      src/engine/devcmd/cmds/HotzoneCmd.java
  14. 4
      src/engine/devcmd/cmds/InfoCmd.java
  15. 4
      src/engine/devcmd/cmds/MakeBaneCmd.java
  16. 2
      src/engine/devcmd/cmds/PurgeObjectsCmd.java
  17. 6
      src/engine/devcmd/cmds/RealmInfoCmd.java
  18. 4
      src/engine/devcmd/cmds/RemoveBaneCmd.java
  19. 2
      src/engine/devcmd/cmds/RemoveObjectCmd.java
  20. 4
      src/engine/devcmd/cmds/SeaAuditCmd.java
  21. 4
      src/engine/devcmd/cmds/SetBaneActiveCmd.java
  22. 4
      src/engine/devcmd/cmds/SetForceRenameCityCmd.java
  23. 2
      src/engine/devcmd/cmds/SummonCmd.java
  24. 24
      src/engine/devcmd/cmds/ZoneInfoCmd.java
  25. 2
      src/engine/devcmd/cmds/ZoneSetCmd.java
  26. 2
      src/engine/gameManager/LootManager.java
  27. 2
      src/engine/gameManager/MovementManager.java
  28. 48
      src/engine/gameManager/ZoneManager.java
  29. 4
      src/engine/mobileAI/utilities/MovementUtilities.java
  30. 6
      src/engine/net/client/ClientMessagePump.java
  31. 2
      src/engine/net/client/handlers/AbandonAssetMsgHandler.java
  32. 2
      src/engine/net/client/handlers/AssetSupportMsgHandler.java
  33. 2
      src/engine/net/client/handlers/ChannelMuteMsgHandler.java
  34. 2
      src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java
  35. 6
      src/engine/net/client/handlers/ManageCityAssetMsgHandler.java
  36. 2
      src/engine/net/client/handlers/ObjectActionMsgHandler.java
  37. 2
      src/engine/net/client/handlers/OrderNPCMsgHandler.java
  38. 44
      src/engine/net/client/handlers/PlaceAssetMsgHandler.java
  39. 4
      src/engine/net/client/handlers/RepairBuildingMsgHandler.java
  40. 2
      src/engine/net/client/msg/CityAssetMsg.java
  41. 4
      src/engine/net/client/msg/GuildTreeStatusMsg.java
  42. 12
      src/engine/net/client/msg/ManageCityAssetsMsg.java
  43. 2
      src/engine/net/client/msg/ViewResourcesMessage.java
  44. 2
      src/engine/objects/AbstractIntelligenceAgent.java
  45. 4
      src/engine/objects/Bane.java
  46. 6
      src/engine/objects/Building.java
  47. 10
      src/engine/objects/City.java
  48. 4
      src/engine/objects/ItemFactory.java
  49. 4
      src/engine/objects/Mine.java
  50. 4
      src/engine/objects/NPC.java
  51. 30
      src/engine/objects/PlayerCharacter.java
  52. 2
      src/engine/objects/Runegate.java
  53. 2
      src/engine/objects/Warehouse.java
  54. 129
      src/engine/objects/Zone.java
  55. 2
      src/engine/powers/poweractions/SummonPowerAction.java
  56. 4
      src/engine/server/world/WorldServer.java
  57. 4
      src/engine/workthreads/DestroyCityThread.java
  58. 4
      src/engine/workthreads/HourlyJobThread.java

2
src/engine/Enum.java

@ -469,7 +469,7 @@ public class Enum { @@ -469,7 +469,7 @@ public class Enum {
// 14001 does not have a banestone to bind at
if (ruinZone.getLoadNum() == 14001)
if (ruinZone.loadNum == 14001)
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30);
else
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc()

19
src/engine/InterestManagement/HeightMap.java

@ -154,8 +154,8 @@ public class HeightMap { @@ -154,8 +154,8 @@ public class HeightMap {
this.heightMapID = 999999;
this.maxHeight = 0;
int halfExtentsX = (int) zone.getBounds().getHalfExtents().x;
int halfExtentsY = (int) zone.getBounds().getHalfExtents().y;
int halfExtentsX = (int) zone.bounds.getHalfExtents().x;
int halfExtentsY = (int) zone.bounds.getHalfExtents().y;
this.zoneLoadID = 0;
this.seaLevel = 0;
@ -191,7 +191,7 @@ public class HeightMap { @@ -191,7 +191,7 @@ public class HeightMap {
HeightMap heightMap = new HeightMap(zone);
HeightMap.heightmapByLoadNum.put(zone.getLoadNum(), heightMap);
HeightMap.heightmapByLoadNum.put(zone.loadNum, heightMap);
}
@ -206,7 +206,7 @@ public class HeightMap { @@ -206,7 +206,7 @@ public class HeightMap {
return zone;
while (nextZone.getHeightMap() == null)
nextZone = nextZone.getParent();
nextZone = nextZone.parent;
return nextZone;
}
@ -247,9 +247,14 @@ public class HeightMap { @@ -247,9 +247,14 @@ public class HeightMap {
}
private static float interpolatePLANAR(Vector3fImmutable worldLoc, Zone heightMapZone, Vector2f zoneLoc, float interpolatedTerrainHeight) {
// zones of type PLANAR
Zone parentZone;
float interpolatedParentTerrainHeight;
parentZone = HeightMap.getNextZoneWithTerrain(heightMapZone.getParent());
parentZone = HeightMap.getNextZoneWithTerrain(heightMapZone.parent);
interpolatedParentTerrainHeight = HeightMap.getWorldHeight(parentZone, worldLoc);
interpolatedParentTerrainHeight += parentZone.worldAltitude;
@ -263,8 +268,8 @@ public class HeightMap { @@ -263,8 +268,8 @@ public class HeightMap {
(heightMapZone.maxBlend.getHalfExtents().y);
float currentArea = (blendBounds.getHalfExtents().x) *
(blendBounds.getHalfExtents().y);
float zoneArea = (heightMapZone.getBounds().getHalfExtents().x) *
(heightMapZone.getBounds().getHalfExtents().y);
float zoneArea = (heightMapZone.bounds.getHalfExtents().x) *
(heightMapZone.bounds.getHalfExtents().y);
blendBounds.release();

2
src/engine/db/archive/CityRecord.java

@ -67,7 +67,7 @@ public class CityRecord extends DataRecord { @@ -67,7 +67,7 @@ public class CityRecord extends DataRecord {
cityRecord.locX = cityRecord.city.getTOL().getLoc().x;
cityRecord.locY = -cityRecord.city.getTOL().getLoc().z; // flip sign on 'y' coordinate
cityRecord.zoneHash = cityRecord.city.getParent().getHash();
cityRecord.zoneHash = cityRecord.city.getParent().hash;
if (cityRecord.eventType.equals(Enum.RecordEventType.CREATE))
cityRecord.establishedDatetime = cityRecord.city.established;

2
src/engine/db/archive/MineRecord.java

@ -52,7 +52,7 @@ public class MineRecord extends DataRecord { @@ -52,7 +52,7 @@ public class MineRecord extends DataRecord {
mineRecord.eventType = eventType;
}
mineRecord.zoneHash = mine.getParentZone().getHash();
mineRecord.zoneHash = mine.getParentZone().hash;
if (character.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
player = (PlayerCharacter) character;

2
src/engine/db/archive/PvpRecord.java

@ -281,7 +281,7 @@ public class PvpRecord extends DataRecord { @@ -281,7 +281,7 @@ public class PvpRecord extends DataRecord {
outStatement.setInt(8, this.victim.getLevel());
outStatement.setString(9, DataWarehouse.hasher.encrypt(zone.getObjectUUID()));
outStatement.setString(10, zone.getName());
outStatement.setString(10, zone.zoneName);
outStatement.setFloat(11, this.location.getX());
outStatement.setFloat(12, -this.location.getZ()); // flip sign on 'y' coordinate
outStatement.setBoolean(13, this.pvpExp);

12
src/engine/db/handlers/dbZoneHandler.java

@ -33,18 +33,18 @@ public class dbZoneHandler extends dbHandlerBase { @@ -33,18 +33,18 @@ public class dbZoneHandler extends dbHandlerBase {
ArrayList<Zone> wsmList = new ArrayList<>();
wsmList.addAll(zone.getNodes());
if (zone.absX == 0.0f) {
zone.absX = zone.getXCoord();
zone.absX = zone.xCoord;
}
if (zone.absY == 0.0f) {
zone.absY = zone.getYCoord();
zone.absY = zone.yCoord;
}
if (zone.absZ == 0.0f) {
zone.absZ = zone.getZCoord();
zone.absZ = zone.zCoord;
}
for (Zone child : zone.getNodes()) {
child.absX = child.getXCoord() + zone.absX;
child.absY = child.getYCoord() + zone.absY;
child.absZ = child.getZCoord() + zone.absZ;
child.absX = child.xCoord + zone.absX;
child.absY = child.yCoord + zone.absY;
child.absZ = child.zCoord + zone.absZ;
wsmList.addAll(this.GET_ALL_NODES(child));
}
return wsmList;

2
src/engine/devcmd/cmds/AddMobCmd.java

@ -78,7 +78,7 @@ public class AddMobCmd extends AbstractDevCmd { @@ -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;
}

6
src/engine/devcmd/cmds/AuditMobsCmd.java

@ -40,8 +40,8 @@ public class AuditMobsCmd extends AbstractDevCmd { @@ -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 { @@ -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");

12
src/engine/devcmd/cmds/GetHeightCmd.java

@ -34,7 +34,7 @@ public class GetHeightCmd extends AbstractDevCmd { @@ -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 { @@ -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, "------------");

2
src/engine/devcmd/cmds/GetOffsetCmd.java

@ -48,7 +48,7 @@ public class GetOffsetCmd extends AbstractDevCmd { @@ -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

2
src/engine/devcmd/cmds/GetZoneCmd.java

@ -51,7 +51,7 @@ public class GetZoneCmd extends AbstractDevCmd { @@ -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

6
src/engine/devcmd/cmds/GotoCmd.java

@ -81,7 +81,7 @@ public class GotoCmd extends AbstractDevCmd { @@ -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 { @@ -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();

4
src/engine/devcmd/cmds/HotzoneCmd.java

@ -40,7 +40,7 @@ public class HotzoneCmd extends AbstractDevCmd { @@ -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 { @@ -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;

4
src/engine/devcmd/cmds/InfoCmd.java

@ -387,7 +387,7 @@ public class InfoCmd extends AbstractDevCmd { @@ -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 { @@ -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
}

4
src/engine/devcmd/cmds/MakeBaneCmd.java

@ -111,12 +111,12 @@ public class MakeBaneCmd extends AbstractDevCmd { @@ -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;

2
src/engine/devcmd/cmds/PurgeObjectsCmd.java

@ -42,7 +42,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd { @@ -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) {

6
src/engine/devcmd/cmds/RealmInfoCmd.java

@ -60,12 +60,12 @@ public class RealmInfoCmd extends AbstractDevCmd { @@ -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";

4
src/engine/devcmd/cmds/RemoveBaneCmd.java

@ -34,12 +34,12 @@ public class RemoveBaneCmd extends AbstractDevCmd { @@ -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;

2
src/engine/devcmd/cmds/RemoveObjectCmd.java

@ -130,7 +130,7 @@ public class RemoveObjectCmd extends AbstractDevCmd { @@ -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);
}

4
src/engine/devcmd/cmds/SeaAuditCmd.java

@ -26,8 +26,8 @@ public class SeaAuditCmd extends AbstractDevCmd { @@ -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

4
src/engine/devcmd/cmds/SetBaneActiveCmd.java

@ -41,12 +41,12 @@ public class SetBaneActiveCmd extends AbstractDevCmd { @@ -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;

4
src/engine/devcmd/cmds/SetForceRenameCityCmd.java

@ -31,9 +31,9 @@ public class SetForceRenameCityCmd extends AbstractDevCmd { @@ -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);

2
src/engine/devcmd/cmds/SummonCmd.java

@ -40,7 +40,7 @@ public class SummonCmd extends AbstractDevCmd { @@ -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);

24
src/engine/devcmd/cmds/ZoneInfoCmd.java

@ -73,21 +73,21 @@ public class ZoneInfoCmd extends AbstractDevCmd { @@ -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 { @@ -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 { @@ -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 { @@ -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);

2
src/engine/devcmd/cmds/ZoneSetCmd.java

@ -40,7 +40,7 @@ public class ZoneSetCmd extends AbstractDevCmd { @@ -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

2
src/engine/gameManager/LootManager.java

@ -86,7 +86,7 @@ public enum LootManager { @@ -86,7 +86,7 @@ public enum LootManager {
if(ib == null)
break;
if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) {
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ib.getName() + ". Are you tough enough to take it?");
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + ib.getName() + ". Are you tough enough to take it?");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);

2
src/engine/gameManager/MovementManager.java

@ -267,7 +267,7 @@ public enum MovementManager { @@ -267,7 +267,7 @@ public enum MovementManager {
Zone serverZone = null;
serverZone = ZoneManager.findSmallestZone(player.getLoc());
cityObject = (City) DbManager.getFromCache(GameObjectType.City, serverZone.getPlayerCityUUID());
cityObject = (City) DbManager.getFromCache(GameObjectType.City, serverZone.playerCityID);
// Do not send group messages if player is on grid

48
src/engine/gameManager/ZoneManager.java

@ -61,8 +61,8 @@ public enum ZoneManager { @@ -61,8 +61,8 @@ public enum ZoneManager {
if (zone != null) {
allIn.add(zone);
while (zone.getParent() != null) {
zone = zone.getParent();
while (zone.parent != null) {
zone = zone.parent;
allIn.add(zone);
}
}
@ -90,7 +90,7 @@ public enum ZoneManager { @@ -90,7 +90,7 @@ public enum ZoneManager {
if (nodes != null)
for (Zone child : nodes) {
if (Bounds.collide(loc, child.getBounds()) == true) {
if (Bounds.collide(loc, child.bounds) == true) {
zone = child;
childFound = true;
break;
@ -106,7 +106,7 @@ public enum ZoneManager { @@ -106,7 +106,7 @@ public enum ZoneManager {
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
ZoneManager.zonesByName.put(zone.zoneName.toLowerCase(), zone);
}
@ -169,7 +169,7 @@ public enum ZoneManager { @@ -169,7 +169,7 @@ public enum ZoneManager {
if (ZoneManager.hotZone == null)
return false;
return (Bounds.collide(loc, ZoneManager.hotZone.getBounds()) == true);
return (Bounds.collide(loc, ZoneManager.hotZone.bounds) == true);
}
public static Zone getSeaFloor() {
@ -182,7 +182,7 @@ public enum ZoneManager { @@ -182,7 +182,7 @@ public enum ZoneManager {
public static final void populateWorldZones(final Zone zone) {
int loadNum = zone.getLoadNum();
int loadNum = zone.loadNum;
// Zones are added to separate
// collections for quick access
@ -194,12 +194,12 @@ public enum ZoneManager { @@ -194,12 +194,12 @@ public enum ZoneManager {
}
if (zone.isPlayerCity()) {
if (zone.isPlayerCity) {
addPlayerCityZone(zone);
return;
}
if (zone.isNPCCity())
if (zone.isNPCCity)
addNPCCityZone(zone);
}
@ -209,12 +209,12 @@ public enum ZoneManager { @@ -209,12 +209,12 @@ public enum ZoneManager {
}
private static void addNPCCityZone(final Zone zone) {
zone.setNPCCity(true);
zone.isNPCCity = true;
ZoneManager.npcCityZones.add(zone);
}
public static final void addPlayerCityZone(final Zone zone) {
zone.setPlayerCity(true);
zone.isPlayerCity = true;
ZoneManager.playerCityZones.add(zone);
}
@ -250,7 +250,7 @@ public enum ZoneManager { @@ -250,7 +250,7 @@ public enum ZoneManager {
public static final boolean validHotZone(Zone zone) {
if (zone.getSafeZone() == (byte) 1)
if (zone.peaceZone == (byte) 1)
return false; // no safe zone hotzones// if (this.hotzone == null)
if (zone.getNodes().isEmpty())
@ -298,14 +298,14 @@ public enum ZoneManager { @@ -298,14 +298,14 @@ public enum ZoneManager {
// Top left corner of zone is calculated in world space by the center and it's extents.
zoneOrigin = new Vector2f(serverZone.getLoc().x, serverZone.getLoc().z);
zoneOrigin = zoneOrigin.subtract(new Vector2f(serverZone.getBounds().getHalfExtents().x, serverZone.getBounds().getHalfExtents().y));
zoneOrigin = zoneOrigin.subtract(new Vector2f(serverZone.bounds.getHalfExtents().x, serverZone.bounds.getHalfExtents().y));
// Local coordinate in world space translated to an offset from the calculated zone origin.
localCoords = new Vector2f(worldVector.x, worldVector.z);
localCoords = localCoords.subtract(zoneOrigin);
localCoords.setY((serverZone.getBounds().getHalfExtents().y * 2) - localCoords.y);
localCoords.setY((serverZone.bounds.getHalfExtents().y * 2) - localCoords.y);
// TODO : Make sure this value does not go outside the zone's bounds.
@ -387,8 +387,8 @@ public enum ZoneManager { @@ -387,8 +387,8 @@ public enum ZoneManager {
currentZone = ZoneManager.findSmallestZone(worldLoc);
if (currentZone.isPlayerCity())
return City.getCity(currentZone.getPlayerCityUUID());
if (currentZone.isPlayerCity)
return City.getCity(currentZone.playerCityID);
return null;
}
@ -420,7 +420,7 @@ public enum ZoneManager { @@ -420,7 +420,7 @@ public enum ZoneManager {
if (zone.isContinent())
continue;
if (Bounds.collide(treeBounds, zone.getBounds(), 0.0f))
if (Bounds.collide(treeBounds, zone.bounds, 0.0f))
validLocation = false;
}
@ -440,8 +440,8 @@ public enum ZoneManager { @@ -440,8 +440,8 @@ public enum ZoneManager {
//not player city, must be npc city..
if (!zone.isPlayerCity())
zone.setNPCCity(true);
if (!zone.isPlayerCity)
zone.isNPCCity = true;
if ((ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER)) && (city.getHash() == null)) {
@ -461,15 +461,15 @@ public enum ZoneManager { @@ -461,15 +461,15 @@ public enum ZoneManager {
// Seafloor
if (zone.getParent() == null)
if (zone.parent == null)
return worldAlttitude;
Zone parentZone = zone.getParent();
Zone parentZone = zone.parent;
// Children of seafloor
if (parentZone.getParent() == null)
return worldAlttitude + zone.getYCoord();
if (parentZone.parent == null)
return worldAlttitude + zone.yCoord;
// return height from heightmap engine at zone location
@ -477,7 +477,7 @@ public enum ZoneManager { @@ -477,7 +477,7 @@ public enum ZoneManager {
// Add zone offset to value
worldAlttitude += zone.getYCoord();
worldAlttitude += zone.yCoord;
return worldAlttitude;
}
@ -487,6 +487,6 @@ public enum ZoneManager { @@ -487,6 +487,6 @@ public enum ZoneManager {
float localAltitude = HeightMap.getWorldHeight(currentLoc);
Zone zone = findSmallestZone(currentLoc);
return localAltitude < zone.getSeaLevel();
return localAltitude < zone.seaLevel;
}
}

4
src/engine/mobileAI/utilities/MovementUtilities.java

@ -68,8 +68,8 @@ public class MovementUtilities { @@ -68,8 +68,8 @@ public class MovementUtilities {
float zoneRange = 250;
if (agent.getParentZone() != null) {
if (agent.getParentZone().getBounds() != null)
zoneRange = agent.getParentZone().getBounds().getHalfExtents().x * 2;
if (agent.getParentZone().bounds != null)
zoneRange = agent.getParentZone().bounds.getHalfExtents().x * 2;
}
if (zoneRange > 300)

6
src/engine/net/client/ClientMessagePump.java

@ -1196,7 +1196,7 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1196,7 +1196,7 @@ public class ClientMessagePump implements NetMsgHandler {
if (npc.getCharItemManager().getInventoryCount() > 150) {
if (npc.getParentZone() != null && npc.getParentZone().getPlayerCityUUID() == 0) {
if (npc.getParentZone() != null && npc.getParentZone().playerCityID == 0) {
ArrayList<Item> inv = npc.getInventory();
for (int i = 0; i < 20; i++) {
try {
@ -1229,7 +1229,7 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1229,7 +1229,7 @@ public class ClientMessagePump implements NetMsgHandler {
if (ib == null)
return;
if (npc.getParentZone() != null && npc.getParentZone().getPlayerCityUUID() != 0)
if (npc.getParentZone() != null && npc.getParentZone().playerCityID != 0)
if (!npc.getCharItemManager().hasRoomInventory(ib.getWeight())) {
ErrorPopupMsg.sendErrorPopup(player, 21);
@ -1280,7 +1280,7 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1280,7 +1280,7 @@ public class ClientMessagePump implements NetMsgHandler {
if (building != null && building.getProtectionState().equals(ProtectionState.NPC))
building = null;
if (npc.getParentZone().getPlayerCityUUID() == 0)
if (npc.getParentZone().playerCityID == 0)
building = null;
//make sure npc can afford item

2
src/engine/net/client/handlers/AbandonAssetMsgHandler.java

@ -151,7 +151,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler { @@ -151,7 +151,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler {
cityZone = ZoneManager.findSmallestZone(targetBuilding.getLoc());
// Can't abandon a tree not within a player city zone
if (cityZone.isPlayerCity() == false)
if (cityZone.isPlayerCity == false)
return;
if (targetBuilding.getCity() == null)

2
src/engine/net/client/handlers/AssetSupportMsgHandler.java

@ -45,7 +45,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { @@ -45,7 +45,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
if (serverZone == null)
return;
serverCity = City.GetCityFromCache(serverZone.getPlayerCityUUID());
serverCity = City.GetCityFromCache(serverZone.playerCityID);
if (serverCity == null)
return;

2
src/engine/net/client/handlers/ChannelMuteMsgHandler.java

@ -65,7 +65,7 @@ public class ChannelMuteMsgHandler extends AbstractClientMsgHandler { @@ -65,7 +65,7 @@ public class ChannelMuteMsgHandler extends AbstractClientMsgHandler {
cityZone = ZoneManager.findSmallestZone(targetBuilding.getLoc());
// Can't abandon a tree not within a player city zone
if (cityZone.isPlayerCity() == false)
if (cityZone.isPlayerCity == false)
return;
if (targetBuilding.getCity().hasBeenTransfered == true) {

2
src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java

@ -69,7 +69,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler { @@ -69,7 +69,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
playerZone = building.getParentZone();
if (playerZone != null)
playerCity = City.getCity(playerZone.getPlayerCityUUID());
playerCity = City.getCity(playerZone.playerCityID);
// Oops! *** Refactor: Log error
switch (msg.getMessageType()) {

6
src/engine/net/client/handlers/ManageCityAssetMsgHandler.java

@ -75,12 +75,12 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { @@ -75,12 +75,12 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
Zone zone = ZoneManager.findSmallestZone(player.getLoc());
if (!zone.isPlayerCity()) {
if (!zone.isPlayerCity) {
ErrorPopupMsg.sendErrorMsg(player, "Unable to find city to command.");
return true;
}
City city = City.GetCityFromCache(zone.getPlayerCityUUID());
City city = City.GetCityFromCache(zone.playerCityID);
if (city == null) {
ErrorPopupMsg.sendErrorMsg(player, "Unable to find city to command.");
@ -254,7 +254,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { @@ -254,7 +254,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
if (baneZone == null)
return true;
City banedCity = City.getCity(baneZone.getPlayerCityUUID());
City banedCity = City.getCity(baneZone.playerCityID);
if (banedCity == null)
return true;

2
src/engine/net/client/handlers/ObjectActionMsgHandler.java

@ -334,7 +334,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { @@ -334,7 +334,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
Zone zone = ZoneManager.findSmallestZone(player.getLoc());
if (zone != null) {
if (zone.isPlayerCity()) {
if (zone.isPlayerCity) {
loc = zone.getLoc();
}
}

2
src/engine/net/client/handlers/OrderNPCMsgHandler.java

@ -288,7 +288,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { @@ -288,7 +288,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
if (zone == null)
return false;
if (zone.getPlayerCityUUID() == 0)
if (zone.playerCityID == 0)
return false;
City city = building.getCity();

44
src/engine/net/client/handlers/PlaceAssetMsgHandler.java

@ -137,7 +137,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -137,7 +137,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
private static boolean validateBuildingPlacement(Zone serverZone, PlaceAssetMsg msg, ClientConnection origin, PlayerCharacter player, PlacementInfo placementInfo) {
if (serverZone.isPlayerCity() == false) {
if (serverZone.isPlayerCity == false) {
PlaceAssetMsg.sendPlaceAssetError(origin, 52, player.getName());
return false;
}
@ -156,7 +156,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -156,7 +156,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Retrieve the building details we're placing
if (serverZone.isNPCCity() == true) {
if (serverZone.isNPCCity == true) {
PlaceAssetMsg.sendPlaceAssetError(origin, 15, ""); // Cannot place in a peace zone
return false;
}
@ -185,7 +185,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -185,7 +185,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Players cannot place buildings in mob zones.
if ((serverZone.isMacroZone() == true)
|| (serverZone.getParent().isMacroZone() == true)) {
|| (serverZone.parent.isMacroZone() == true)) {
PlaceAssetMsg.sendPlaceAssetError(origin, 57, player.getName()); // No building may be placed within this territory
return false;
}
@ -201,8 +201,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -201,8 +201,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Cannot place assets on a dead tree
if ((serverZone.isPlayerCity())
&& (City.getCity(serverZone.getPlayerCityUUID()).getTOL().getRank() == -1)) {
if ((serverZone.isPlayerCity)
&& (City.getCity(serverZone.playerCityID).getTOL().getRank() == -1)) {
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Cannot place asset on dead tree until world heals");
return false;
}
@ -261,14 +261,14 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -261,14 +261,14 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Must be a player city
if (serverZone.isPlayerCity() == false) {
if (serverZone.isPlayerCity == false) {
PlaceAssetMsg.sendPlaceAssetError(origin, 41, player.getName()); // Cannot place outside a guild zone
return false;
}
//Test zone has a city object
City city = City.getCity(serverZone.getPlayerCityUUID());
City city = City.getCity(serverZone.playerCityID);
if (city == null) {
PlaceAssetMsg.sendPlaceAssetError(origin, 52, ""); //"no city to associate asset with"
@ -512,7 +512,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -512,7 +512,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
if (serverZone == null)
return false;
cityObject = City.getCity(serverZone.getPlayerCityUUID());
cityObject = City.getCity(serverZone.playerCityID);
// Early exit if something went horribly wrong
@ -571,7 +571,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -571,7 +571,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// No valid player city found
if (serverCity == null || serverCity.getParent().isPlayerCity() == false) {
if (serverCity == null || serverCity.getParent().isPlayerCity == false) {
PlaceAssetMsg.sendPlaceAssetError(origin, 52, ""); // Cannot place outisde a guild zone
return false;
}
@ -749,8 +749,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -749,8 +749,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
cityObjects = DbManager.CityQueries.CREATE_CITY(playerCharacter.getObjectUUID(), serverZone.getObjectUUID(),
serverRealm.getRealmID(),
plantLoc.x - serverZone.getAbsX(), plantLoc.y,
plantLoc.z - serverZone.getAbsZ(), treeInfo.getRot().y, treeInfo.getW(), playerCharacter.getGuild().getName(), LocalDateTime.now());
plantLoc.x - serverZone.absX, plantLoc.y,
plantLoc.z - serverZone.absZ, treeInfo.getRot().y, treeInfo.getW(), playerCharacter.getGuild().getName(), LocalDateTime.now());
// Uh oh!
@ -783,10 +783,10 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -783,10 +783,10 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Link the zone with the city and then add
// to the appropriate hash tables and cache
zoneObject.setPlayerCity(true);
zoneObject.isPlayerCity = true;
if (zoneObject.getParent() != null)
zoneObject.getParent().addNode(zoneObject); //add as child to parent
if (zoneObject.parent != null)
zoneObject.parent.addNode(zoneObject); //add as child to parent
ZoneManager.addZone(zoneObject.getObjectUUID(), zoneObject);
ZoneManager.addPlayerCityZone(zoneObject);
@ -857,7 +857,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -857,7 +857,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
if (serverZone == null)
return false;
cityObject = City.getCity(serverZone.getPlayerCityUUID());
cityObject = City.getCity(serverZone.playerCityID);
if (cityObject == null)
return false;
@ -931,7 +931,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -931,7 +931,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
int shrineCount = 0;
cityObject = City.getCity(serverZone.getPlayerCityUUID());
cityObject = City.getCity(serverZone.playerCityID);
// Cannot place shrine in abandoned city. Shrines must be owned
// by the tol owner not the person placing them.
@ -1001,7 +1001,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1001,7 +1001,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
int barracksCount = 0;
cityObject = City.getCity(serverZone.getPlayerCityUUID());
cityObject = City.getCity(serverZone.playerCityID);
// Cannot place barracks in abandoned city.
@ -1061,7 +1061,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1061,7 +1061,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
if (validateCityBuildingPlacement(serverZone, msg, origin, player, msg.getFirstPlacementInfo()) == false)
return false;
cityObject = City.getCity(serverZone.getPlayerCityUUID());
cityObject = City.getCity(serverZone.playerCityID);
// We need to be able to access how much gold a character is carrying
@ -1117,7 +1117,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1117,7 +1117,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
building.removeFromCache();
WorldGrid.RemoveWorldObject(building);
WorldGrid.removeObject(building);
building.getParentZone().getParent().zoneBuildingSet.remove(building);
building.getParentZone().parent.zoneBuildingSet.remove(building);
if (building.getBlueprint() != null && building.getBlueprint().getBuildingGroup().equals(BuildingGroup.BARRACK)) {
building.RemoveFromBarracksList();
}
@ -1229,7 +1229,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1229,7 +1229,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
shrineType = Shrine.getShrineTypeByBlueprintUUID(blueprint.getBlueprintUUID());
city = City.getCity(currentZone.getPlayerCityUUID());
city = City.getCity(currentZone.playerCityID);
if (city == null)
return false;
@ -1294,7 +1294,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1294,7 +1294,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
return false;
}
city = City.getCity(currentZone.getPlayerCityUUID());
city = City.getCity(currentZone.playerCityID);
if (city == null)
return false;
@ -1369,7 +1369,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -1369,7 +1369,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
newMesh.runAfterLoad();
} else if (ago.getObjectType() == GameObjectType.Warehouse) {
Warehouse warehouse = (Warehouse) ago;
City city = City.getCity(currentZone.getPlayerCityUUID());
City city = City.getCity(currentZone.playerCityID);
if (city == null)
return true;

4
src/engine/net/client/handlers/RepairBuildingMsgHandler.java

@ -44,11 +44,11 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler { @@ -44,11 +44,11 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler {
serverZone = ZoneManager.findSmallestZone(pc.getLoc());
if (serverZone.getPlayerCityUUID() == 0 && targetBuilding.getBlueprint() != null && targetBuilding.getBlueprint().getBuildingGroup() != BuildingGroup.MINE)
if (serverZone.playerCityID == 0 && targetBuilding.getBlueprint() != null && targetBuilding.getBlueprint().getBuildingGroup() != BuildingGroup.MINE)
return;
City city = City.GetCityFromCache(serverZone.getPlayerCityUUID());
City city = City.GetCityFromCache(serverZone.playerCityID);
if (city != null) {
if (city.getBane() != null && city.protectionEnforced == false)

2
src/engine/net/client/msg/CityAssetMsg.java

@ -92,7 +92,7 @@ public class CityAssetMsg extends ClientNetMsg { @@ -92,7 +92,7 @@ public class CityAssetMsg extends ClientNetMsg {
return;
}
city = City.getCity(zone.getPlayerCityUUID());
city = City.getCity(zone.playerCityID);
if (city == null) {
Logger.debug("Failed to load city data for Tree of life.");

4
src/engine/net/client/msg/GuildTreeStatusMsg.java

@ -117,8 +117,8 @@ public class GuildTreeStatusMsg extends ClientNetMsg { @@ -117,8 +117,8 @@ public class GuildTreeStatusMsg extends ClientNetMsg {
city = null;
if (cityZone != null)
if (cityZone.isPlayerCity())
city = City.GetCityFromCache(cityZone.getPlayerCityUUID());
if (cityZone.isPlayerCity)
city = City.GetCityFromCache(cityZone.playerCityID);
else if (this.treeOfLife != null && this.treeOfLife.getGuild() != null)
city = this.treeOfLife.getGuild().getOwnedCity();

12
src/engine/net/client/msg/ManageCityAssetsMsg.java

@ -299,8 +299,8 @@ public class ManageCityAssetsMsg extends ClientNetMsg { @@ -299,8 +299,8 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
Set<Building> buildings = ZoneManager.findSmallestZone(assetManager.getLoc()).zoneBuildingSet;
Building tol = null;
if (playerZone.getPlayerCityUUID() != 0)
city = City.GetCityFromCache(playerZone.getPlayerCityUUID());
if (playerZone.playerCityID != 0)
city = City.GetCityFromCache(playerZone.playerCityID);
if (city != null)
tol = city.getTOL();
@ -368,7 +368,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg { @@ -368,7 +368,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
if (zone == null)
return;
City banedCity = City.getCity(zone.getPlayerCityUUID());
City banedCity = City.getCity(zone.playerCityID);
if (banedCity == null)
return;
@ -479,7 +479,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg { @@ -479,7 +479,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
if (zone == null)
writer.putString("Forlord");
else
writer.putString(zone.getName());
writer.putString(zone.zoneName);
writer.putString(building.getGuild().getName());
@ -621,9 +621,9 @@ public class ManageCityAssetsMsg extends ClientNetMsg { @@ -621,9 +621,9 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
} else {
writer.putInt(1); //kos on/off?
writer.putInt(3); // was 3
if (zone.getPlayerCityUUID() != 0 && asset.assetIsProtected()) {
if (zone.playerCityID != 0 && asset.assetIsProtected()) {
writer.putInt(GameObjectType.Building.ordinal());
writer.putInt(City.getCity(zone.getPlayerCityUUID()).getTOL().getObjectUUID());
writer.putInt(City.getCity(zone.playerCityID).getTOL().getObjectUUID());
} else {
writer.putInt(0);
writer.putInt(0);

2
src/engine/net/client/msg/ViewResourcesMessage.java

@ -73,7 +73,7 @@ public class ViewResourcesMessage extends ClientNetMsg { @@ -73,7 +73,7 @@ public class ViewResourcesMessage extends ClientNetMsg {
if (this.warehouseBuilding.getParentZone() == null)
return false;
this.city = (City) DbManager.getObject(Enum.GameObjectType.City, this.warehouseBuilding.getParentZone().getPlayerCityUUID());
this.city = (City) DbManager.getObject(Enum.GameObjectType.City, this.warehouseBuilding.getParentZone().playerCityID);
if (this.city == null)
return false;

2
src/engine/objects/AbstractIntelligenceAgent.java

@ -130,7 +130,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { @@ -130,7 +130,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter {
ArrayList<Zone> allIn = ZoneManager.getAllZonesIn(this.getLoc());
for (Zone zone : allIn)
if (zone.getSafeZone() == (byte) 1)
if (zone.peaceZone == (byte) 1)
return true;
return false;

4
src/engine/objects/Bane.java

@ -162,8 +162,8 @@ public final class Bane { @@ -162,8 +162,8 @@ public final class Bane {
// Cannot place assets on a dead tree
if ((cityZone.isPlayerCity()) &&
(City.getCity(cityZone.getPlayerCityUUID()).getTOL().getRank() == -1)) {
if ((cityZone.isPlayerCity) &&
(City.getCity(cityZone.playerCityID).getTOL().getRank() == -1)) {
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Cannot bane a dead tree!");
return false;
}

6
src/engine/objects/Building.java

@ -460,10 +460,10 @@ public class Building extends AbstractWorldObject { @@ -460,10 +460,10 @@ public class Building extends AbstractWorldObject {
}
}
}
if (this.parentZone.isPlayerCity() == false)
if (this.parentZone.isPlayerCity == false)
return null;
return City.getCity(this.parentZone.getPlayerCityUUID());
return City.getCity(this.parentZone.playerCityID);
}
@ -1402,7 +1402,7 @@ public class Building extends AbstractWorldObject { @@ -1402,7 +1402,7 @@ public class Building extends AbstractWorldObject {
// Buildings on an npc citygrid are never vulnerable
if (this.getCity() != null) {
if (this.getCity().getParent().isNPCCity() == true)
if (this.getCity().getParent().isNPCCity == true)
return false;
}

10
src/engine/objects/City.java

@ -334,7 +334,7 @@ public class City extends AbstractWorldObject { @@ -334,7 +334,7 @@ public class City extends AbstractWorldObject {
if (city.noTeleport)
continue;
if (city.parentZone != null && city.parentZone.isPlayerCity()) {
if (city.parentZone != null && city.parentZone.isPlayerCity) {
if (pc.getAccount().status.equals(AccountStatus.ADMIN)) {
cities.add(city);
@ -395,7 +395,7 @@ public class City extends AbstractWorldObject { @@ -395,7 +395,7 @@ public class City extends AbstractWorldObject {
if (city.noRepledge)
continue;
if (city.parentZone != null && city.parentZone.isPlayerCity()) {
if (city.parentZone != null && city.parentZone.isPlayerCity) {
//list Player cities
//open city, just list
@ -589,7 +589,7 @@ public class City extends AbstractWorldObject { @@ -589,7 +589,7 @@ public class City extends AbstractWorldObject {
if (zone.getHeightMap() == null && this.isNpc == 1 && this.getObjectUUID() != 1213) {
HeightMap.GenerateCustomHeightMap(zone);
Logger.info(zone.getName() + " created custom heightmap");
Logger.info(zone.zoneName + " created custom heightmap");
}
} catch (Exception e) {
Logger.error(e);
@ -791,7 +791,7 @@ public class City extends AbstractWorldObject { @@ -791,7 +791,7 @@ public class City extends AbstractWorldObject {
// Any players currently in the zone will not be processed by the heartbeat
// if it's not the first effect toggled so we do it here manually
currentPlayers = WorldGrid.getObjectsInRangePartial(this.location, this.parentZone.getBounds().getHalfExtents().x * 1.2f, MBServerStatics.MASK_PLAYER);
currentPlayers = WorldGrid.getObjectsInRangePartial(this.location, this.parentZone.bounds.getHalfExtents().x * 1.2f, MBServerStatics.MASK_PLAYER);
for (AbstractWorldObject playerObject : currentPlayers) {
@ -874,7 +874,7 @@ public class City extends AbstractWorldObject { @@ -874,7 +874,7 @@ public class City extends AbstractWorldObject {
}
public boolean isLocationOnCityZone(Vector3fImmutable insideLoc) {
return Bounds.collide(insideLoc, this.parentZone.getBounds());
return Bounds.collide(insideLoc, this.parentZone.bounds);
}
private void applyAllCityEffects(PlayerCharacter player) {

4
src/engine/objects/ItemFactory.java

@ -104,7 +104,7 @@ public class ItemFactory { @@ -104,7 +104,7 @@ public class ItemFactory {
if (zone == null)
return null;
City city = City.getCity(zone.getPlayerCityUUID());
City city = City.getCity(zone.playerCityID);
if (city == null)
return null;
@ -796,7 +796,7 @@ public class ItemFactory { @@ -796,7 +796,7 @@ public class ItemFactory {
if (zone == null)
return null;
City city = City.getCity(zone.getPlayerCityUUID());
City city = City.getCity(zone.playerCityID);
if (city == null)
return null;

4
src/engine/objects/Mine.java

@ -64,7 +64,7 @@ public class Mine extends AbstractGameObject { @@ -64,7 +64,7 @@ public class Mine extends AbstractGameObject {
this.flags = rs.getInt("flags");
int parent = rs.getInt("parent");
this.parentZone = ZoneManager.getZoneByUUID(parent);
this.zoneName = this.parentZone.getParent().getName();
this.zoneName = this.parentZone.parent.zoneName;
this.owningGuild = Guild.getGuild(ownerUID);
Guild nation = null;
@ -129,7 +129,7 @@ public class Mine extends AbstractGameObject { @@ -129,7 +129,7 @@ public class Mine extends AbstractGameObject {
mine.getTimestamps().put("MineAttack", System.currentTimeMillis() + MBServerStatics.ONE_MINUTE);
ChatManager.chatNationInfo(mine.getGuild().getNation(), mine.getName() + " in " + mine.getParentZone().getParent().getName() + " is Under attack!");
ChatManager.chatNationInfo(mine.getGuild().getNation(), mine.getName() + " in " + mine.getParentZone().parent.zoneName + " is Under attack!");
}
public static void loadAllMines() {

4
src/engine/objects/NPC.java

@ -894,7 +894,7 @@ public class NPC extends AbstractCharacter { @@ -894,7 +894,7 @@ public class NPC extends AbstractCharacter {
this.stamina.set(this.staminaMax);
}
if (this.parentZone.isPlayerCity())
if (this.parentZone.isPlayerCity)
if (NPC.GetNPCProfits(this) == null)
NPCProfits.CreateProfits(this);
@ -1192,7 +1192,7 @@ public class NPC extends AbstractCharacter { @@ -1192,7 +1192,7 @@ public class NPC extends AbstractCharacter {
if (serverZone == null)
return null;
city = City.GetCityFromCache(serverZone.getPlayerCityUUID());
city = City.GetCityFromCache(serverZone.playerCityID);
if (city == null) {

30
src/engine/objects/PlayerCharacter.java

@ -1507,16 +1507,16 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1507,16 +1507,16 @@ public class PlayerCharacter extends AbstractCharacter {
return true;
Zone zone = ZoneManager.findSmallestZone(breather.getLoc());
if (zone.getSeaLevel() != 0) {
if (zone.seaLevel != 0) {
float localAltitude = breather.getLoc().y;
if (localAltitude + breather.characterHeight < zone.getSeaLevel() - 2)
if (localAltitude + breather.characterHeight < zone.seaLevel - 2)
return false;
if (breather.isMoving()) {
if (localAltitude + breather.characterHeight < zone.getSeaLevel())
if (localAltitude + breather.characterHeight < zone.seaLevel)
return false;
}
} else {
@ -1547,12 +1547,12 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1547,12 +1547,12 @@ public class PlayerCharacter extends AbstractCharacter {
Zone zone = ZoneManager.findSmallestZone(enterer.getLoc());
if (zone.getSeaLevel() != 0) {
if (zone.seaLevel != 0) {
float localAltitude = enterer.getLoc().y + enterer.characterHeight;
if (localAltitude < zone.getSeaLevel())
if (localAltitude < zone.seaLevel)
return true;
} else {
if (enterer.getLoc().y + enterer.characterHeight < 0)
@ -1579,12 +1579,12 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1579,12 +1579,12 @@ public class PlayerCharacter extends AbstractCharacter {
leaveWater = 1f;
if (zone.getSeaLevel() != 0) {
if (zone.seaLevel != 0) {
float localAltitude = leaver.getLoc().y;
if (localAltitude + leaveWater < zone.getSeaLevel())
if (localAltitude + leaveWater < zone.seaLevel)
return false;
} else {
if (leaver.getLoc().y + leaveWater < 0)
@ -1703,7 +1703,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1703,7 +1703,7 @@ public class PlayerCharacter extends AbstractCharacter {
Zone zone = ZoneManager.findSmallestZone(this.getLoc());
if (zone != null) {
return zone.getSafeZone() == (byte) 1;
return zone.peaceZone == (byte) 1;
}
return false;
@ -1797,7 +1797,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1797,7 +1797,7 @@ public class PlayerCharacter extends AbstractCharacter {
//DeathShroud
if (zone.getSafeZone() == 0)
if (zone.peaceZone == 0)
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
//enable this to give players deathshroud if mobs kill player.
@ -1843,7 +1843,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1843,7 +1843,7 @@ public class PlayerCharacter extends AbstractCharacter {
//DeathShroud
if (zone.getSafeZone() == 0)
if (zone.peaceZone == 0)
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
if (doPVPEXP) {
@ -1898,7 +1898,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -1898,7 +1898,7 @@ public class PlayerCharacter extends AbstractCharacter {
killCleanup();
Zone zone = ZoneManager.findSmallestZone(this.getLoc());
if (zone.getSafeZone() == 0)
if (zone.peaceZone == 0)
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
// Send death message if needed
@ -4739,10 +4739,10 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4739,10 +4739,10 @@ public class PlayerCharacter extends AbstractCharacter {
Zone zone = ZoneManager.findSmallestZone(this.getLoc());
if (zone.getSeaLevel() != 0) {
if (zone.seaLevel != 0) {
float localAltitude = this.getLoc().y + this.centerHeight;
if (localAltitude < zone.getSeaLevel())
if (localAltitude < zone.seaLevel)
return true;
} else {
if (this.getLoc().y + this.centerHeight < 0)
@ -4764,9 +4764,9 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4764,9 +4764,9 @@ public class PlayerCharacter extends AbstractCharacter {
Zone zone = ZoneManager.findSmallestZone(currentLoc);
if (zone.getSeaLevel() != 0) {
if (zone.seaLevel != 0) {
if (localAltitude < zone.getSeaLevel())
if (localAltitude < zone.seaLevel)
return true;
} else {
if (localAltitude < 0)

2
src/engine/objects/Runegate.java

@ -108,7 +108,7 @@ public class Runegate { @@ -108,7 +108,7 @@ public class Runegate {
writer.putInt(gateBuilding.getObjectType().ordinal());
writer.putInt(gateBuilding.getObjectUUID());
writer.putString(gateBuilding.getParentZone().getName());
writer.putString(gateBuilding.getParentZone().zoneName);
writer.putFloat(gateBuilding.getLoc().getLat());
writer.putFloat(gateBuilding.getLoc().getAlt());
writer.putFloat(gateBuilding.getLoc().getLong());

2
src/engine/objects/Warehouse.java

@ -1272,7 +1272,7 @@ public class Warehouse extends AbstractWorldObject { @@ -1272,7 +1272,7 @@ public class Warehouse extends AbstractWorldObject {
return;
}
City city = City.getCity(cityZone.getPlayerCityUUID());
City city = City.getCity(cityZone.playerCityID);
if (city == null) {
Logger.error("Failed to load City for Warehouse with UUID " + this.getObjectUUID());

129
src/engine/objects/Zone.java

@ -33,31 +33,31 @@ public class Zone extends AbstractGameObject { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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,19 +294,8 @@ public class Zone extends AbstractGameObject { @@ -358,19 +294,8 @@ public class Zone extends AbstractGameObject {
if (this.getNodes().get(0).isMacroZone())
return true;
return this.getParent().equals(ZoneManager.getSeaFloor());
}
/**
* @return the bounds
*/
public Bounds getBounds() {
return bounds;
}
return this.parent.equals(ZoneManager.getSeaFloor());
public String getHash() {
return hash;
}
public void setHash() {
@ -392,8 +317,4 @@ public class Zone extends AbstractGameObject { @@ -392,8 +317,4 @@ public class Zone extends AbstractGameObject {
return HeightMap.heightmapByLoadNum.get(this.loadNum);
}
public float getSeaLevel() {
return seaLevel;
}
}

2
src/engine/powers/poweractions/SummonPowerAction.java

@ -55,7 +55,7 @@ public class SummonPowerAction extends AbstractPowerAction { @@ -55,7 +55,7 @@ public class SummonPowerAction extends AbstractPowerAction {
String location = "Somewhere";
if (zone != null)
location = zone.getName();
location = zone.zoneName;
RecvSummonsRequestMsg rsrm = new RecvSummonsRequestMsg(source.getObjectType().ordinal(), source.getObjectUUID(), source.getFirstName(),
location, false);

4
src/engine/server/world/WorldServer.java

@ -469,7 +469,7 @@ public class WorldServer { @@ -469,7 +469,7 @@ public class WorldServer {
for (Zone zone : ZoneManager.getAllZones()) {
if (zone.getHeightMap() != null) {
if (zone.getHeightMap().bucketWidthX == 0) {
System.out.println("Zone load num: " + zone.getLoadNum() + " has no bucket width");
System.out.println("Zone load num: " + zone.loadNum + " has no bucket width");
}
}
}
@ -565,7 +565,7 @@ public class WorldServer { @@ -565,7 +565,7 @@ public class WorldServer {
for (Zone zone : rootParent) {
ZoneManager.addZone(zone.getLoadNum(), zone);
ZoneManager.addZone(zone.loadNum, zone);
//Handle Buildings

4
src/engine/workthreads/DestroyCityThread.java

@ -53,7 +53,7 @@ public class DestroyCityThread implements Runnable { @@ -53,7 +53,7 @@ public class DestroyCityThread implements Runnable {
// Member variable assignment
cityZone = city.getParent();
newParent = cityZone.getParent();
newParent = cityZone.parent;
formerGuild = city.getTOL().getGuild();
// Former guild loses it's tree!
@ -150,6 +150,6 @@ public class DestroyCityThread implements Runnable { @@ -150,6 +150,6 @@ public class DestroyCityThread implements Runnable {
// Zone and city should vanish upon next reboot
// if the codebase reaches here.
Logger.info(city.getParent().getName() + " uuid:" + city.getObjectUUID() + "has been destroyed!");
Logger.info(city.getParent().zoneName + " uuid:" + city.getObjectUUID() + "has been destroyed!");
}
}

4
src/engine/workthreads/HourlyJobThread.java

@ -166,7 +166,7 @@ public class HourlyJobThread implements Runnable { @@ -166,7 +166,7 @@ public class HourlyJobThread implements Runnable {
mineBuilding.rebuildMine();
WorldGrid.updateObject(mineBuilding);
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mine.lastClaimer.getName() + " has claimed the mine in " + mine.getParentZone().getParent().getName() + " for " + mine.getOwningGuild().getName() + ". The mine is no longer active.");
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mine.lastClaimer.getName() + " has claimed the mine in " + mine.getParentZone().parent.zoneName + " for " + mine.getOwningGuild().getName() + ". The mine is no longer active.");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
@ -205,7 +205,7 @@ public class HourlyJobThread implements Runnable { @@ -205,7 +205,7 @@ public class HourlyJobThread implements Runnable {
if (ZoneManager.hotZone == null) {
Logger.error("Null HotZone returned from ZoneManager");
} else {
Logger.info("HotZone switched to: " + ZoneManager.hotZone.getName());
Logger.info("HotZone switched to: " + ZoneManager.hotZone.zoneName);
}
} catch (Exception e) {

Loading…
Cancel
Save