1
0
forked from noxious/server

#245 : Enhanced asset CRUD logic

This commit is contained in:
2025-02-18 17:09:15 +01:00
parent 4c7751db55
commit 0efa9fb1d5
10 changed files with 55 additions and 21 deletions

View File

@ -22,14 +22,14 @@ export default class CharacterConnectEvent extends BaseEvent {
private async handleEvent(data: CharacterConnectPayload, callback: (response: any) => void): Promise<void> {
try {
if (await this.checkForActiveCharacters()) {
this.emitError('You are already connected to another character')
this.sendNotificationAndLog('You are already connected to another character')
return
}
const character = await this.characterRepository.getByUserAndId(this.socket.userId, data.characterId)
if (!character) {
this.emitError('Character not found or does not belong to this user')
this.sendNotificationAndLog('Character not found or does not belong to this user')
return
}