From 46e67be8ca890543ededc1a5114ddc6973a67e86 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Sep 2023 11:57:52 -0500 Subject: [PATCH] player character attacks added to city outlaws --- src/engine/objects/AbstractCharacter.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 2ad1ab69..cbbb88f3 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -14,10 +14,7 @@ import engine.Enum.*; import engine.InterestManagement.InterestManager; import engine.InterestManagement.WorldGrid; import engine.exception.SerializationException; -import engine.gameManager.CombatManager; -import engine.gameManager.ConfigManager; -import engine.gameManager.MovementManager; -import engine.gameManager.PowersManager; +import engine.gameManager.*; import engine.job.AbstractJob; import engine.job.JobContainer; import engine.job.JobScheduler; @@ -1254,6 +1251,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject { target.guardedCity.cityOutlaws.add(attacker.getObjectUUID()); } } + } else if(this.getObjectType().equals(GameObjectType.PlayerCharacter)){ + City playerCity = ZoneManager.getCityAtLocation(this.loc); + if(playerCity != null){ + if(!attacker.getGuild().getNation().equals(playerCity.getGuild().getNation())) + if(!playerCity.getGuild().getNation().getAllyList().contains(attacker.getGuild().getNation())) + if(!playerCity.cityOutlaws.contains(attacker.getObjectUUID())) + playerCity.cityOutlaws.add(attacker.getObjectUUID()); + } } return newHealth - oldHealth; } finally {