forked from MagicBane/Server
Refactored Zone to new system
This commit is contained in:
@@ -12,7 +12,6 @@ package engine.objects;
|
||||
import engine.Enum;
|
||||
import engine.InterestManagement.Terrain;
|
||||
import engine.db.archive.DataWarehouse;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.math.Bounds;
|
||||
import engine.math.Vector2f;
|
||||
@@ -292,19 +291,6 @@ public class Zone extends AbstractWorldObject {
|
||||
return this.parentZoneID;
|
||||
}
|
||||
|
||||
public ArrayList<Zone> getNodes() {
|
||||
|
||||
if (this.nodes == null) {
|
||||
this.nodes = DbManager.ZoneQueries.GET_MAP_NODES(super.getObjectUUID());
|
||||
|
||||
//Add reverse lookup for child->parent
|
||||
if (this.nodes != null)
|
||||
for (Zone zone : this.nodes)
|
||||
zone.setParent(this);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
||||
/*
|
||||
* Serializing
|
||||
*/
|
||||
@@ -323,10 +309,10 @@ public class Zone extends AbstractWorldObject {
|
||||
if (this.equals(ZoneManager.seaFloor))
|
||||
return false;
|
||||
|
||||
if (this.getNodes().isEmpty())
|
||||
if (this.nodes.isEmpty())
|
||||
return false;
|
||||
|
||||
if (this.getNodes().get(0).isMacroZone())
|
||||
if (this.nodes.get(0).isMacroZone())
|
||||
return true;
|
||||
|
||||
return this.parent.equals(ZoneManager.seaFloor);
|
||||
|
||||
Reference in New Issue
Block a user