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()) {