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 { ItemRarity, ItemType } from '#application/enums'
|
||||
import { Item } from '#entities/item'
|
||||
@ -5,7 +6,7 @@ import SpriteRepository from '#repositories/spriteRepository'
|
||||
|
||||
export default class ItemCreateEvent extends BaseEvent {
|
||||
public listen(): void {
|
||||
this.socket.on('gm:item:create', this.handleEvent.bind(this))
|
||||
this.socket.on(SocketEvent.GM_ITEM_CREATE, this.handleEvent.bind(this))
|
||||
}
|
||||
|
||||
private async handleEvent(data: undefined, callback: (response: boolean, item?: any) => void): Promise<void> {
|
||||
|
Reference in New Issue
Block a user