maintenance completed

This commit is contained in:
2024-05-27 21:36:26 -05:00
parent ba537d7b00
commit 4bdc207c37
2 changed files with 5 additions and 0 deletions
@@ -183,6 +183,7 @@ public enum MaintenanceManager {
Logger.error("Maintenance Failed To Find City To Destroy"); Logger.error("Maintenance Failed To Find City To Destroy");
for(Building building : city.getParent().zoneBuildingSet){ for(Building building : city.getParent().zoneBuildingSet){
building.setRank(-1); building.setRank(-1);
DbManager.removeFromCache(building);
} }
city.getParent().zoneBuildingSet.clear(); city.getParent().zoneBuildingSet.clear();
} }
+4
View File
@@ -5,6 +5,10 @@ import engine.objects.Guild;
public class ZergManager { public class ZergManager {
public static int getBaneCap(Guild guild) { public static int getBaneCap(Guild guild) {
if(guild.getOwnedCity() == null || guild.getOwnedCity().getTOL() == null)
return 0;
int cityRank = guild.getOwnedCity().getTOL().getRank(); int cityRank = guild.getOwnedCity().getTOL().getRank();
return (cityRank == 8) ? 20 : ((guild.getNation().getSubGuildList().size() + 1 <= 4) ? 10 : 20); return (cityRank == 8) ? 20 : ((guild.getNation().getSubGuildList().size() + 1 <= 4) ? 10 : 20);
} }