From ede016a93db2f16350e375ec21912b5692c1c96b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 19 Jun 2024 14:43:31 -0400 Subject: [PATCH] Never null --- src/engine/objects/City.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index 5b52985b..126c8757 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -640,19 +640,12 @@ public class City extends AbstractWorldObject { public Guild getGuild() { if (this.getTOL() == null) - return null; - - if (this.isNpc == 1) { + return Guild.getErrantGuild(); - if (this.getTOL().getOwner() == null) - return null; - return this.getTOL().getOwner().getGuild(); - } else { + if (this.getTOL().getOwner() == null) + return Guild.getErrantGuild(); - if (this.getTOL().getOwner() == null) - return null; - return this.getTOL().getOwner().getGuild(); - } + return this.getTOL().getOwner().getGuild(); } public boolean openCity(boolean open) {