Browse Source

null resolution

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

2
src/engine/objects/Mob.java

@ -1711,7 +1711,7 @@ 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;
if(ZoneManager.getCityAtLocation(this.building.getLoc()) != null) if(this.building != null && ZoneManager.getCityAtLocation(this.building.getLoc()) != null)
this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc());
else else
this.guardedCity = null; this.guardedCity = null;

Loading…
Cancel
Save