From 300452d2d81125deb57e37c8e647b6b2c9a35c67 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 3 Jun 2024 21:42:08 -0500 Subject: [PATCH] attack delay catching --- src/engine/gameManager/CombatManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 529bb476..3b9749dd 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -126,6 +126,13 @@ public enum CombatManager { return; } + if (attacker.getTimers().containsKey("Attack" + slot)) { + AttackJob ajR = ((AttackJob)attacker.getTimers().get("Attack" + slot).getJob()); + if(ajR.target.equals(target)){ + return; + } + } + target.combatLock.writeLock().lock(); // check if character is in range to attack target