forked from noxious/server
Replaced all event names with numbers for less bandwidth usage
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { SocketEvent } from '#application/enums';
|
||||
import { BaseEvent } from '#application/base/baseEvent'
|
||||
import CharacterAttackService from '#services/characterAttackService'
|
||||
|
||||
@ -5,7 +6,7 @@ export default class CharacterMove extends BaseEvent {
|
||||
private readonly characterAttackService = CharacterAttackService
|
||||
|
||||
public listen(): void {
|
||||
this.socket.on('map:character:attack', this.handleEvent.bind(this))
|
||||
this.socket.on(SocketEvent.MAP_CHARACTER_ATTACK, this.handleEvent.bind(this))
|
||||
}
|
||||
|
||||
private async handleEvent(data: any, callback: (response: any) => void): Promise<void> {
|
||||
|
Reference in New Issue
Block a user