diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index fceb317f..49dcd971 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -126,6 +126,24 @@ public enum CombatManager { return; } + long delay = 0L; + if(attacker.getTimestamps().containsKey("Attack" + slot)){ + + if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)){ + if(slot.equals(mbEnums.EquipSlotType.RHELD)){ + delay = (long)(attacker.speedHandOne * 100L); + }else{ + delay = (long)(attacker.speedHandTwo * 100L); + } + } + + if(System.currentTimeMillis() < attacker.getTimestamps().get("Attack" + slot)){ + return; + } + } + + attacker.getTimestamps().put("Attack" + slot, System.currentTimeMillis() + delay); + target.combatLock.writeLock().lock(); // check if character is in range to attack target @@ -194,7 +212,7 @@ public enum CombatManager { } //get delay for the auto attack job - long delay = 5000; + delay = 5000; //if (weapon != null) {