diff --git a/src/events/map/characterAttack.ts b/src/events/map/characterAttack.ts index 4ded236..8afbe7c 100644 --- a/src/events/map/characterAttack.ts +++ b/src/events/map/characterAttack.ts @@ -19,6 +19,11 @@ export default class CharacterMove extends BaseEvent { // Don't attack if the character is already moving if (this.getMapCharacter()?.isMoving) return + const throttleKey = `attack_${this.socket.characterId}` + if (this.isThrottled(throttleKey, 1000)) { + return + } + // Start attack await this.characterAttackService.attack(this.socket.characterId!) } catch (error) {