Browse Source

combat null fix

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
e4274994ff
  1. 7
      src/engine/gameManager/CombatManager.java

7
src/engine/gameManager/CombatManager.java

@ -809,10 +809,7 @@ public enum CombatManager {
float damage; float damage;
if (wb != null) damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
else
damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)){ if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)ac).ZergMultiplier; damage *= ((PlayerCharacter)ac).ZergMultiplier;
@ -830,7 +827,7 @@ public enum CombatManager {
if (tarAc.getObjectType() == GameObjectType.Mob) { if (tarAc.getObjectType() == GameObjectType.Mob) {
if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)) { 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); ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage);
} else{ } else{
((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), damage); ((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), damage);

Loading…
Cancel
Save