Browse Source

Refactored Zone to new system

combat-2
MagicBot 1 year ago
parent
commit
ff1c0bd347
  1. 4
      src/engine/gameManager/ZoneManager.java
  2. 2
      src/engine/objects/Zone.java

4
src/engine/gameManager/ZoneManager.java

@ -239,10 +239,10 @@ public enum ZoneManager { @@ -239,10 +239,10 @@ public enum ZoneManager {
if (zone.peace_zone == (byte) 1)
return false; // no safe zone hotzones// if (this.hotzone == null)
if (zone.nodes.isEmpty())
if (zone.equals(ZoneManager.seaFloor))
return false;
if (zone.equals(ZoneManager.seaFloor))
if (zone.nodes.isEmpty())
return false;
//no duplicate hotZones

2
src/engine/objects/Zone.java

@ -50,7 +50,7 @@ public class Zone extends AbstractWorldObject { @@ -50,7 +50,7 @@ public class Zone extends AbstractWorldObject {
public int min_level;
public int max_level;
public boolean hasBeenHotzone = false;
public ArrayList<Zone> nodes = null;
public ArrayList<Zone> nodes = new ArrayList<>();
public int parentZoneID;
public Zone parent = null;
public Bounds bounds;

Loading…
Cancel
Save