Browse Source

early exit for pets attacking a null target

postwipe-mines
FatBoy-DOTC 6 months ago
parent
commit
4feb95131c
  1. 2
      src/engine/gameManager/CombatManager.java

2
src/engine/gameManager/CombatManager.java

@ -124,7 +124,7 @@ public enum CombatManager {
return; return;
//check if this slot is on attack timer, if timer has passed clear it, else early exit //check if this slot is on attack timer, if timer has passed clear it, else early exit
if(attacker.getTimers().containsKey("Attack"+slot.name())) if(attacker.getTimers() != null && attacker.getTimers().containsKey("Attack"+slot.name()))
if(attacker.getTimers().get("Attack"+slot.name()).timeToExecutionLeft() <= 0) if(attacker.getTimers().get("Attack"+slot.name()).timeToExecutionLeft() <= 0)
attacker.getTimers().remove("Attack"+slot.name()); attacker.getTimers().remove("Attack"+slot.name());
else else

Loading…
Cancel
Save