Browse Source

dual wield spam attack issue resolved

magicbox-1.5.2.1
FatBoy-DOTC 5 months ago
parent
commit
f07974f673
  1. 10
      src/engine/gameManager/CombatManager.java

10
src/engine/gameManager/CombatManager.java

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

Loading…
Cancel
Save