Browse Source

Template now templteID to make room for the actual template.

combat-2
MagicBot 1 year ago
parent
commit
4795a315ad
  1. 2
      src/engine/Enum.java
  2. 2
      src/engine/devcmd/cmds/GetZoneCmd.java
  3. 4
      src/engine/devcmd/cmds/InfoCmd.java
  4. 4
      src/engine/devcmd/cmds/ZoneInfoCmd.java
  5. 2
      src/engine/devcmd/cmds/ZoneSetCmd.java
  6. 2
      src/engine/gameManager/ZoneManager.java
  7. 8
      src/engine/objects/Zone.java

2
src/engine/Enum.java

@ -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.template == 14001) if (ruinZone.templateID == 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()

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

@ -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.template); throwbackInfo(pcSender, zone.zoneName + "; UUID: " + zone.getObjectUUID() + ", loadNum: " + zone.templateID);
} }
@Override @Override

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

@ -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().template; output += "Parent Zone LoadNum : " + targetNPC.getParentZone().templateID;
} }
@ -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().template; output += "Parent Zone LoadNum : " + targetMob.getParentZone().templateID;
} catch (Exception ex) { } catch (Exception ex) {
//who cares //who cares
} }

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

@ -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.template; output += "loadNum: " + zone.templateID;
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;
@ -127,7 +127,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
for (Zone child : nodes) { for (Zone child : nodes) {
output += newline; output += newline;
output += child.zoneName + " (" + child.template + ')'; output += child.zoneName + " (" + child.templateID + ')';
} }
} }
throwbackInfo(player, output); throwbackInfo(player, output);

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

@ -40,7 +40,7 @@ public class ZoneSetCmd extends AbstractDevCmd {
zone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); zone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.template + ") " + zone.getObjectUUID()); throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.templateID + ") " + zone.getObjectUUID());
// NPC // NPC

2
src/engine/gameManager/ZoneManager.java

@ -169,7 +169,7 @@ public enum ZoneManager {
// collections for quick access // collections for quick access
// based upon their type. // based upon their type.
ZoneManager.zonesByID.put(zone.template, zone); ZoneManager.zonesByID.put(zone.templateID, zone);
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone); ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);

8
src/engine/objects/Zone.java

@ -39,7 +39,7 @@ public class Zone extends AbstractWorldObject {
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 template; public final int templateID;
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;
@ -86,7 +86,7 @@ public class Zone extends AbstractWorldObject {
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.template = rs.getInt("template"); this.templateID = 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");
@ -123,7 +123,7 @@ public class Zone extends AbstractWorldObject {
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) { 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!"); 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.
@ -141,7 +141,7 @@ public class Zone extends AbstractWorldObject {
writer.putInt(0); writer.putInt(0);
writer.putInt(0); writer.putInt(0);
writer.putInt(zone.template); writer.putInt(zone.templateID);
if (zone.playerCityUUID > 0) { if (zone.playerCityUUID > 0) {
City k = City.getCity(zone.playerCityUUID); City k = City.getCity(zone.playerCityUUID);

Loading…
Cancel
Save