From 69ea460d5e4c0e9602b76a1e443651f5b0d570f8 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 26 May 2024 20:31:22 -0500 Subject: [PATCH] early exit for attack timer --- src/engine/gameManager/CombatManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 3a228b98..5d6766c7 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -546,6 +546,10 @@ public enum CombatManager { public static void setAutoAttackJob(AbstractCharacter attacker, mbEnums.EquipSlotType slot, long delay) { //calculate next allowed attack and update the timestamp + + if(attacker.getTimestamps().containsKey("Attack" + slot.name()) && attacker.getTimestamps().get("Attack" + slot.name()) > System.currentTimeMillis()) + return; + attacker.getTimestamps().put("Attack" + slot.name(), System.currentTimeMillis() + delay); //handle auto attack job creation