From 41b1718df12edf3aaa54911d84df9314a18a671c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 13:19:50 -0500 Subject: [PATCH] use delay for attacks for players --- 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 d5fc4b56..e1558930 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -104,6 +104,16 @@ public enum CombatManager { public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, mbEnums.EquipSlotType slot) { + if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { + if (!attacker.isCombat()) + return; + + if (attacker.getTimestamps().get("Attack" + slot.name()) != null && attacker.getTimestamps().get("Attack" + slot.name()) < System.currentTimeMillis()) { + setAutoAttackJob(attacker, slot, 1000); + return; + } + } + // check if character is in range to attack target PlayerBonuses bonus = attacker.getBonuses();