class and table schema now conform to JSON

This commit is contained in:
2023-09-20 16:06:57 -04:00
parent be107c0858
commit 34d450fecf
9 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -469,7 +469,7 @@ public class Enum {
// 14001 does not have a banestone to bind at // 14001 does not have a banestone to bind at
if (ruinZone.zoneTemplate == 14001) if (ruinZone.template == 14001)
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30); spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30);
else else
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc() spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc()
+1 -1
View File
@@ -191,7 +191,7 @@ public class HeightMap {
HeightMap heightMap = new HeightMap(zone); HeightMap heightMap = new HeightMap(zone);
HeightMap.heightmapByLoadNum.put(zone.zoneTemplate, heightMap); HeightMap.heightmapByLoadNum.put(zone.template, heightMap);
} }
+1 -1
View File
@@ -51,7 +51,7 @@ public class GetZoneCmd extends AbstractDevCmd {
} }
for (Zone zone : allIn) for (Zone zone : allIn)
throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.zoneTemplate); throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.template);
} }
@Override @Override
+2 -2
View File
@@ -387,7 +387,7 @@ public class InfoCmd extends AbstractDevCmd {
output += newline; output += newline;
output += "EquipSet: " + targetNPC.getEquipmentSetID(); output += "EquipSet: " + targetNPC.getEquipmentSetID();
output += newline; output += newline;
output += "Parent Zone LoadNum : " + targetNPC.getParentZone().zoneTemplate; output += "Parent Zone LoadNum : " + targetNPC.getParentZone().template;
} }
@@ -473,7 +473,7 @@ public class InfoCmd extends AbstractDevCmd {
output += "EquipSet: " + targetMob.equipmentSetID; output += "EquipSet: " + targetMob.equipmentSetID;
output += newline; output += newline;
try { try {
output += "Parent Zone LoadNum : " + targetMob.getParentZone().zoneTemplate; output += "Parent Zone LoadNum : " + targetMob.getParentZone().template;
} catch (Exception ex) { } catch (Exception ex) {
//who cares //who cares
} }
+2 -2
View File
@@ -75,7 +75,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
output += newline; output += newline;
output += "name: " + zone.zoneName; output += "name: " + zone.zoneName;
output += newline; output += newline;
output += "loadNum: " + zone.zoneTemplate; output += "loadNum: " + zone.template;
if (zone.parent != null) { if (zone.parent != null) {
output += StringUtils.addWS(", parent: " + zone.parent.getObjectUUID(), 30); output += StringUtils.addWS(", parent: " + zone.parent.getObjectUUID(), 30);
output += "Parentabs: x: " + zone.parent.absX + ", y: " + zone.parent.absY + ", z: " + zone.parent.absZ; output += "Parentabs: x: " + zone.parent.absX + ", y: " + zone.parent.absY + ", z: " + zone.parent.absZ;
@@ -130,7 +130,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
for (Zone child : nodes) { for (Zone child : nodes) {
output += newline; output += newline;
output += child.zoneName + " (" + child.zoneTemplate + ')'; output += child.zoneName + " (" + child.template + ')';
} }
} }
throwbackInfo(player, output); throwbackInfo(player, output);
+1 -1
View File
@@ -40,7 +40,7 @@ public class ZoneSetCmd extends AbstractDevCmd {
zone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); zone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.zoneTemplate + ") " + zone.getObjectUUID()); throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.template + ") " + zone.getObjectUUID());
// NPC // NPC
+1 -1
View File
@@ -182,7 +182,7 @@ public enum ZoneManager {
public static final void populateWorldZones(final Zone zone) { public static final void populateWorldZones(final Zone zone) {
int loadNum = zone.zoneTemplate; int loadNum = zone.template;
// Zones are added to separate // Zones are added to separate
// collections for quick access // collections for quick access
+6 -6
View File
@@ -38,7 +38,7 @@ public class Zone extends AbstractGameObject {
public final float xOffset; public final float xOffset;
public final float zOffset; public final float zOffset;
public final float yOffset; public final float yOffset;
public final int zoneTemplate; 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;
@@ -74,7 +74,7 @@ public class Zone extends AbstractGameObject {
this.xOffset = rs.getFloat("xOffset"); this.xOffset = rs.getFloat("xOffset");
this.zOffset = rs.getFloat("zOffset"); this.zOffset = rs.getFloat("zOffset");
this.yOffset = rs.getFloat("yOffset"); this.yOffset = rs.getFloat("yOffset");
this.zoneTemplate = 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");
@@ -106,7 +106,7 @@ public class Zone extends AbstractGameObject {
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) { public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {
if (zone.zoneTemplate == 0 && zone.playerCityUUID == 0) if (zone.template == 0 && zone.playerCityUUID == 0)
Logger.warn("Warning! WorldServerMap with ID " + zone.getObjectUUID() + " has a loadnum of 0 (player city) and no city linked. This will probably crash the client!"); Logger.warn("Warning! WorldServerMap with ID " + zone.getObjectUUID() + " has a loadnum of 0 (player city) and no city linked. This will probably crash the client!");
// Player City Terraform values serialized here. // Player City Terraform values serialized here.
@@ -124,7 +124,7 @@ public class Zone extends AbstractGameObject {
writer.putInt(0); writer.putInt(0);
writer.putInt(0); writer.putInt(0);
writer.putInt(zone.zoneTemplate); writer.putInt(zone.template);
if (zone.playerCityUUID > 0) { if (zone.playerCityUUID > 0) {
City k = City.getCity(zone.playerCityUUID); City k = City.getCity(zone.playerCityUUID);
@@ -167,7 +167,7 @@ public class Zone extends AbstractGameObject {
this.bounds = Bounds.borrow(); this.bounds = Bounds.borrow();
Vector2f zoneSize = ZoneManager._zone_size_data.get(this.zoneTemplate); Vector2f zoneSize = ZoneManager._zone_size_data.get(this.template);
// Default to player zone size on error? Maybe log this // Default to player zone size on error? Maybe log this
@@ -313,7 +313,7 @@ public class Zone extends AbstractGameObject {
if (this.guild_zone) if (this.guild_zone)
return HeightMap.PlayerCityHeightMap; return HeightMap.PlayerCityHeightMap;
return HeightMap.heightmapByLoadNum.get(this.zoneTemplate); return HeightMap.heightmapByLoadNum.get(this.template);
} }
} }
+2 -2
View File
@@ -469,7 +469,7 @@ public class WorldServer {
for (Zone zone : ZoneManager.getAllZones()) { for (Zone zone : ZoneManager.getAllZones()) {
if (zone.getHeightMap() != null) { if (zone.getHeightMap() != null) {
if (zone.getHeightMap().bucketWidthX == 0) { if (zone.getHeightMap().bucketWidthX == 0) {
System.out.println("Zone load num: " + zone.zoneTemplate + " has no bucket width"); System.out.println("Zone load num: " + zone.template + " has no bucket width");
} }
} }
} }
@@ -565,7 +565,7 @@ public class WorldServer {
for (Zone zone : rootParent) { for (Zone zone : rootParent) {
ZoneManager.addZone(zone.zoneTemplate, zone); ZoneManager.addZone(zone.template, zone);
//Handle Buildings //Handle Buildings