Browse Source

use delay for attacks for players

combat-2
FatBoy-DOTC 8 months ago
parent
commit
41b1718df1
  1. 10
      src/engine/gameManager/CombatManager.java

10
src/engine/gameManager/CombatManager.java

@ -104,6 +104,16 @@ public enum CombatManager { @@ -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();

Loading…
Cancel
Save