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 { MapObject } from '#entities/mapObject'
|
||||
import MapObjectRepository from '#repositories/mapObjectRepository'
|
||||
@ -6,7 +7,7 @@ interface IPayload {}
|
||||
|
||||
export default class MapObjectListEvent extends BaseEvent {
|
||||
public listen(): void {
|
||||
this.socket.on('gm:mapObject:list', this.handleEvent.bind(this))
|
||||
this.socket.on(SocketEvent.GM_MAPOBJECT_LIST, this.handleEvent.bind(this))
|
||||
}
|
||||
|
||||
private async handleEvent(data: IPayload, callback: (response: MapObject[]) => void): Promise<void> {
|
||||
|
Reference in New Issue
Block a user