From ff1c0bd3470a7892a50f4b2dc564c4580af695d6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 18 Oct 2023 09:08:41 -0400 Subject: [PATCH] Refactored Zone to new system --- src/engine/gameManager/ZoneManager.java | 4 ++-- src/engine/objects/Zone.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/ZoneManager.java b/src/engine/gameManager/ZoneManager.java index f987c4d1..5d79ee2b 100644 --- a/src/engine/gameManager/ZoneManager.java +++ b/src/engine/gameManager/ZoneManager.java @@ -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 diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index 69b11b0c..49415c24 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -50,7 +50,7 @@ public class Zone extends AbstractWorldObject { public int min_level; public int max_level; public boolean hasBeenHotzone = false; - public ArrayList nodes = null; + public ArrayList nodes = new ArrayList<>(); public int parentZoneID; public Zone parent = null; public Bounds bounds;