New collection utilized

This commit is contained in:
2023-10-19 16:44:29 -04:00
parent cf7e19bfde
commit 1daa45d604
+2 -3
View File
@@ -63,7 +63,6 @@ public class Building extends AbstractWorldObject {
public float statAlt;
public LocalDateTime upgradeDateTime = null;
public LocalDateTime taxDateTime = null;
public ArrayList<Vector3fImmutable> patrolPoints = new ArrayList<>();
public ArrayList<Vector3fImmutable> sentryPoints = new ArrayList<>();
public TaxType taxType = TaxType.NONE;
public int taxAmount;
@@ -96,6 +95,7 @@ public class Building extends AbstractWorldObject {
private ConcurrentHashMap<String, Long> timestamps = null;
private ConcurrentHashMap<Integer, BuildingFriends> friends;
private ConcurrentHashMap<Integer, Condemned> condemned;
public ArrayList<Vector3fImmutable> patrolPoints;
public ProtectionState protectionState = ProtectionState.NONE;
private ArrayList<Building> 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