forked from noxious/server
Cleanup
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { Server } from 'socket.io'
|
||||
|
||||
import type { TSocket } from '@/application/types'
|
||||
|
||||
import { SocketEvent } from '@/application/enums'
|
||||
import Logger, { LoggerType } from '@/application/logger'
|
||||
import type { TSocket } from '@/application/types'
|
||||
import { Character } from '@/entities/character'
|
||||
import CharacterRepository from '@/repositories/characterRepository'
|
||||
import { Server } from 'socket.io'
|
||||
|
||||
export abstract class BaseEvent {
|
||||
protected readonly logger = Logger.type(LoggerType.GAME)
|
||||
@@ -31,7 +29,7 @@ export abstract class BaseEvent {
|
||||
|
||||
protected async getCharacter(): Promise<Character | null> {
|
||||
const characterRepository = new CharacterRepository()
|
||||
return characterRepository.getById(this.socket.characterId!)
|
||||
return characterRepository.getById(this.socket.characterId)
|
||||
}
|
||||
|
||||
protected async isCharacterGM(): Promise<boolean> {
|
||||
|
Reference in New Issue
Block a user