diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index aa06721d..e62d9dd9 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -63,7 +63,6 @@ public class Building extends AbstractWorldObject { public float statAlt; public LocalDateTime upgradeDateTime = null; public LocalDateTime taxDateTime = null; - public ArrayList patrolPoints = new ArrayList<>(); public ArrayList sentryPoints = new ArrayList<>(); public TaxType taxType = TaxType.NONE; public int taxAmount; @@ -96,6 +95,7 @@ public class Building extends AbstractWorldObject { private ConcurrentHashMap timestamps = null; private ConcurrentHashMap friends; private ConcurrentHashMap condemned; + public ArrayList patrolPoints; public ProtectionState protectionState = ProtectionState.NONE; private ArrayList children = null; @@ -926,8 +926,7 @@ public class Building extends AbstractWorldObject { if (this.blueprintUUID == 0) this.setHealth(healthMax); - if (blueprint.getBuildingGroup().equals(BuildingGroup.BARRACK)) - this.patrolPoints = DbManager.BuildingQueries.LOAD_PATROL_POINTS(this); + this.patrolPoints = BuildingManager._buildingPatrolPoints.computeIfAbsent(this.getObjectUUID(), k -> new ArrayList<>()); } else { this.healthMax = 100000; // Structures with no blueprint mesh