From 4795a315ad5d255865ed65d2ad9c3cd2040eaf49 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 20 Oct 2023 15:20:30 -0400 Subject: [PATCH] Template now templteID to make room for the actual template. --- src/engine/Enum.java | 2 +- src/engine/devcmd/cmds/GetZoneCmd.java | 2 +- src/engine/devcmd/cmds/InfoCmd.java | 4 ++-- src/engine/devcmd/cmds/ZoneInfoCmd.java | 4 ++-- src/engine/devcmd/cmds/ZoneSetCmd.java | 2 +- src/engine/gameManager/ZoneManager.java | 2 +- src/engine/objects/Zone.java | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/engine/Enum.java b/src/engine/Enum.java index 266730c3..e4b4b9a3 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -469,7 +469,7 @@ public class Enum { // 14001 does not have a banestone to bind at - if (ruinZone.template == 14001) + if (ruinZone.templateID == 14001) spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30); else spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc() diff --git a/src/engine/devcmd/cmds/GetZoneCmd.java b/src/engine/devcmd/cmds/GetZoneCmd.java index 85ec0afb..857a3a47 100644 --- a/src/engine/devcmd/cmds/GetZoneCmd.java +++ b/src/engine/devcmd/cmds/GetZoneCmd.java @@ -51,7 +51,7 @@ public class GetZoneCmd extends AbstractDevCmd { } for (Zone zone : allIn) - throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.template); + throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.templateID); } @Override diff --git a/src/engine/devcmd/cmds/InfoCmd.java b/src/engine/devcmd/cmds/InfoCmd.java index 38a7fe77..de86ac66 100644 --- a/src/engine/devcmd/cmds/InfoCmd.java +++ b/src/engine/devcmd/cmds/InfoCmd.java @@ -387,7 +387,7 @@ public class InfoCmd extends AbstractDevCmd { output += newline; output += "EquipSet: " + targetNPC.getEquipmentSetID(); output += newline; - output += "Parent Zone LoadNum : " + targetNPC.getParentZone().template; + output += "Parent Zone LoadNum : " + targetNPC.getParentZone().templateID; } @@ -473,7 +473,7 @@ public class InfoCmd extends AbstractDevCmd { output += "EquipSet: " + targetMob.equipmentSetID; output += newline; try { - output += "Parent Zone LoadNum : " + targetMob.getParentZone().template; + output += "Parent Zone LoadNum : " + targetMob.getParentZone().templateID; } catch (Exception ex) { //who cares } diff --git a/src/engine/devcmd/cmds/ZoneInfoCmd.java b/src/engine/devcmd/cmds/ZoneInfoCmd.java index 05b80230..46650c2a 100644 --- a/src/engine/devcmd/cmds/ZoneInfoCmd.java +++ b/src/engine/devcmd/cmds/ZoneInfoCmd.java @@ -75,7 +75,7 @@ public class ZoneInfoCmd extends AbstractDevCmd { output += newline; output += "name: " + zone.zoneName; output += newline; - output += "loadNum: " + zone.template; + output += "loadNum: " + zone.templateID; 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; @@ -127,7 +127,7 @@ public class ZoneInfoCmd extends AbstractDevCmd { for (Zone child : nodes) { output += newline; - output += child.zoneName + " (" + child.template + ')'; + output += child.zoneName + " (" + child.templateID + ')'; } } throwbackInfo(player, output); diff --git a/src/engine/devcmd/cmds/ZoneSetCmd.java b/src/engine/devcmd/cmds/ZoneSetCmd.java index 4d949134..eb8be8b1 100644 --- a/src/engine/devcmd/cmds/ZoneSetCmd.java +++ b/src/engine/devcmd/cmds/ZoneSetCmd.java @@ -40,7 +40,7 @@ public class ZoneSetCmd extends AbstractDevCmd { zone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); - throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.template + ") " + zone.getObjectUUID()); + throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.templateID + ") " + zone.getObjectUUID()); // NPC diff --git a/src/engine/gameManager/ZoneManager.java b/src/engine/gameManager/ZoneManager.java index 86081dd5..de34e5c4 100644 --- a/src/engine/gameManager/ZoneManager.java +++ b/src/engine/gameManager/ZoneManager.java @@ -169,7 +169,7 @@ public enum ZoneManager { // collections for quick access // based upon their type. - ZoneManager.zonesByID.put(zone.template, zone); + ZoneManager.zonesByID.put(zone.templateID, zone); ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone); diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index 207cff18..942b3eef 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -39,7 +39,7 @@ public class Zone extends AbstractWorldObject { public final float xOffset; public final float zOffset; public final float yOffset; - public final int template; + public final int templateID; public final byte peace_zone; public final String icon1; public final String icon2; @@ -86,7 +86,7 @@ public class Zone extends AbstractWorldObject { this.xOffset = rs.getFloat("xOffset"); this.zOffset = rs.getFloat("zOffset"); this.yOffset = rs.getFloat("yOffset"); - this.template = rs.getInt("template"); + this.templateID = rs.getInt("template"); this.peace_zone = rs.getByte("peace_zone"); this.icon1 = rs.getString("icon1"); this.icon2 = rs.getString("icon2"); @@ -123,7 +123,7 @@ public class Zone extends AbstractWorldObject { public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) { - if (zone.template == 0 && zone.playerCityUUID == 0) + if (zone.templateID == 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!"); // Player City Terraform values serialized here. @@ -141,7 +141,7 @@ public class Zone extends AbstractWorldObject { writer.putInt(0); writer.putInt(0); - writer.putInt(zone.template); + writer.putInt(zone.templateID); if (zone.playerCityUUID > 0) { City k = City.getCity(zone.playerCityUUID);