mobai null resolution
This commit is contained in:
1 parent
ab96cfcda4
commit
6017641896
3 files changed
+40
-36
No files matched your search
@@ -395,8 +395,10 @@ public class Building extends AbstractWorldObject {
|
||||
//friendly building has been attacked, add attacker to city outlaw list
|
||||
if (!playerCity.cityOutlaws.contains(attacker.getObjectUUID()) && attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
playerCity.cityOutlaws.add(attacker.getObjectUUID());
|
||||
//only city guards respond; siege engines and pets in the zone are left alone
|
||||
|
||||
for (Mob guard : playerCity.getParent().zoneMobSet)
|
||||
if (guard.combatTarget == null)
|
||||
if (guard.isPlayerGuard() && guard.combatTarget == null)
|
||||
guard.setCombatTarget(attacker);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user