From e4274994ff52297d91dcd85101f01d7ac1f6abf7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 25 Feb 2024 20:40:37 -0600 Subject: [PATCH] combat null fix --- src/engine/gameManager/CombatManager.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 3462a92f..df4a6a37 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -809,10 +809,7 @@ public enum CombatManager { float damage; - if (wb != null) - damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists); - else - damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists); + damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists); if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)){ damage *= ((PlayerCharacter)ac).ZergMultiplier; @@ -830,7 +827,7 @@ public enum CombatManager { if (tarAc.getObjectType() == GameObjectType.Mob) { if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)) { - if(((Mob) tarAc).playerAgroMap.contains(ac.getObjectUUID())) { + if(((Mob) tarAc).playerAgroMap.containsKey(ac.getObjectUUID())) { ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage); } else{ ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), damage);