Browse Source

null check fix

lakebane-master
FatBoy-DOTC 5 months ago
parent
commit
ba642e049e
  1. 5
      src/engine/objects/Mob.java

5
src/engine/objects/Mob.java

@ -1711,7 +1711,10 @@ public class Mob extends AbstractIntelligenceAgent {
this.behaviourType = MobBehaviourType.GuardCaptain; this.behaviourType = MobBehaviourType.GuardCaptain;
this.spawnTime = 60 * 15; this.spawnTime = 60 * 15;
this.isPlayerGuard = true; this.isPlayerGuard = true;
this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); if(ZoneManager.getCityAtLocation(this.building.getLoc()) != null)
this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc());
else
this.guardedCity = null;
} }
// Load AI for wall archers // Load AI for wall archers

Loading…
Cancel
Save