From 4bdc207c37ea7110e7b6012c18f674d9623dfd71 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 27 May 2024 21:36:26 -0500 Subject: [PATCH] maintenance completed --- src/engine/gameManager/MaintenanceManager.java | 1 + src/engine/gameManager/ZergManager.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/engine/gameManager/MaintenanceManager.java b/src/engine/gameManager/MaintenanceManager.java index d854dc95..2427d2f1 100644 --- a/src/engine/gameManager/MaintenanceManager.java +++ b/src/engine/gameManager/MaintenanceManager.java @@ -183,6 +183,7 @@ public enum MaintenanceManager { Logger.error("Maintenance Failed To Find City To Destroy"); for(Building building : city.getParent().zoneBuildingSet){ building.setRank(-1); + DbManager.removeFromCache(building); } city.getParent().zoneBuildingSet.clear(); } diff --git a/src/engine/gameManager/ZergManager.java b/src/engine/gameManager/ZergManager.java index c92f28d8..239e3e4e 100644 --- a/src/engine/gameManager/ZergManager.java +++ b/src/engine/gameManager/ZergManager.java @@ -5,6 +5,10 @@ import engine.objects.Guild; public class ZergManager { public static int getBaneCap(Guild guild) { + + if(guild.getOwnedCity() == null || guild.getOwnedCity().getTOL() == null) + return 0; + int cityRank = guild.getOwnedCity().getTOL().getRank(); return (cityRank == 8) ? 20 : ((guild.getNation().getSubGuildList().size() + 1 <= 4) ? 10 : 20); }