diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 47c50945..3462a92f 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -829,8 +829,14 @@ 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)) { + if(((Mob) tarAc).playerAgroMap.contains(ac.getObjectUUID())) { + ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage); + } else{ + ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), damage); + } + + } ((Mob) tarAc).handleDirectAggro(ac); }