Browse Source

Template now templteID to make room for the actual template.

magicbox-1.5.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 { @@ -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()

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

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

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

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

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.zoneName + " (" + zone.template + ") " + zone.getObjectUUID());
throwbackInfo(playerCharacter, zone.zoneName + " (" + zone.templateID + ") " + zone.getObjectUUID());
// NPC

2
src/engine/gameManager/ZoneManager.java

@ -169,7 +169,7 @@ public enum ZoneManager { @@ -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);

8
src/engine/objects/Zone.java

@ -39,7 +39,7 @@ public class Zone extends AbstractWorldObject { @@ -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 { @@ -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 { @@ -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 { @@ -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);

Loading…
Cancel
Save