From ef3e3a039229ffa24ffa1569d359ec885a51dd43 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 5 Sep 2023 13:43:09 -0400 Subject: [PATCH] .contains check needed. --- src/engine/gameManager/CombatManager.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 74cde7af..a6ae4d7b 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -826,8 +826,8 @@ public enum CombatManager { damage *= 2.5f; //increase damage if sitting if (tarAc.getObjectType() == GameObjectType.Mob) { - if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)) - ((Mob)tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage); + if (ac.getObjectType().equals(GameObjectType.PlayerCharacter)) + ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage); ((Mob) tarAc).handleDirectAggro(ac); } @@ -1325,7 +1325,8 @@ public enum CombatManager { // Add to city outlaw list - if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter)) + if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter) && + attackedMobile.guardedCity.cityOutlaws.contains(attacker.getObjectUUID()) == false) attackedMobile.guardedCity.cityOutlaws.add(attacker.getObjectUUID()); }