From 134838072dcbb87fd5458133b1784c5d526226e6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 23 Oct 2023 05:45:03 -0400 Subject: [PATCH] getCity() updated for object --- src/engine/objects/Building.java | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index b288f0e2..4abfc3bc 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -287,30 +287,7 @@ public class Building extends AbstractWorldObject { public final City getCity() { - if (this.parentZone == null) - return null; - - if (this.getBlueprint() != null && this.getBlueprint().isSiegeEquip() && this.protectionState.equals(ProtectionState.PROTECTED)) { - if (this.getGuild() != null) { - if (this.getGuild().getOwnedCity() != null) { - if (this.getLoc().isInsideCircle(this.getGuild().getOwnedCity().getLoc(), CityBoundsType.ZONE.halfExtents)) - return this.getGuild().getOwnedCity(); - } else { - Bane bane = Bane.getBaneByAttackerGuild(this.getGuild()); - - if (bane != null) { - if (bane.getCity() != null) { - if (this.getLoc().isInsideCircle(bane.getCity().getLoc(), CityBoundsType.ZONE.halfExtents)) - return bane.getCity(); - } - } - } - } - } - if (this.parentZone.guild_zone == false) - return null; - - return City.getCity(this.parentZone.playerCityUUID); + return ZoneManager.getCityAtLocation(this.getLoc()); }