Method made static and moved to manager.

This commit is contained in:
2023-08-15 08:50:02 -04:00
parent 6d3050f08a
commit c913618dc3
4 changed files with 29 additions and 27 deletions
-25
View File
@@ -1271,31 +1271,6 @@ public class NPC extends AbstractCharacter {
}
}
public ArrayList<Building> getProtectedBuildings() {
ArrayList<Building> protectedBuildings = new ArrayList<>();
if (this.building == null)
return protectedBuildings;
if (this.building.getCity() == null)
return protectedBuildings;
for (Building b : this.building.getCity().getParent().zoneBuildingSet) {
if (b.getBlueprint() == null)
continue;
if (b.getProtectionState().equals(ProtectionState.CONTRACT))
protectedBuildings.add(b);
if (b.getProtectionState().equals(ProtectionState.PENDING))
protectedBuildings.add(b);
}
return protectedBuildings;
}
@Override
public Guild getGuild() {
if (this.building != null)