Logging null building

This commit is contained in:
2024-02-26 15:49:45 -05:00
parent 2885457ea6
commit 441b2fe42a
+4
View File
@@ -1557,11 +1557,15 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
case GuardCaptain: case GuardCaptain:
this.agentType = AIAgentType.GUARDCAPTAIN; this.agentType = AIAgentType.GUARDCAPTAIN;
this.spawnDelay = 600; this.spawnDelay = 600;
if (this.building == null)
Logger.error("Captain : " + this.getObjectUUID() + " : " + this.buildingUUID);
this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc());
break; break;
case GuardWallArcher: case GuardWallArcher:
this.agentType = AIAgentType.GUARDWALLARCHER; this.agentType = AIAgentType.GUARDWALLARCHER;
this.spawnDelay = 450; this.spawnDelay = 450;
if (this.building == null)
Logger.error("Wall Archer : " + this.getObjectUUID() + " : " + this.buildingUUID);
this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc());
break; break;
} }