From f07974f6733dd0a8280b968b7d47c290bc79e19d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Jul 2024 19:46:06 -0500 Subject: [PATCH] dual wield spam attack issue resolved --- src/engine/gameManager/CombatManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 0165404d..9b1aa48d 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -221,6 +221,16 @@ public enum CombatManager { if (inRange) { + if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)){ + if(!attacker.getTimestamps().contains(slot.name()+"Attack")){ + attacker.getTimestamps().put(slot.name()+"Attack", System.currentTimeMillis() - 1000); + } else if(System.currentTimeMillis() < attacker.getTimestamps().get(slot.name()+"Attack") + delay){ + setAutoAttackJob(attacker,slot,delay); + return; + } + } + + //handle retaliate if (AbstractCharacter.IsAbstractCharacter(target)) { if (((AbstractCharacter) target).combatTarget == null || !((AbstractCharacter) target).combatTarget.isAlive()) {