1
0
forked from noxious/server

#143 : Fix switching back to zone from zoneEditor

This commit is contained in:
2024-09-28 02:52:16 +02:00
parent 21a75f6cbe
commit dec6b36699
2 changed files with 13 additions and 10 deletions

View File

@ -22,9 +22,8 @@ export default class CharacterConnectEvent {
try {
const character = await CharacterRepository.getByUserAndId(this.socket?.user?.id as number, data.character_id)
if (!character) return
this.socket.characterId = character.id
CharacterManager.initCharacter(character as ExtendedCharacter)
this.socket.characterId = character.id
this.socket.emit('character:connect', character)
} catch (error: any) {
console.log('character:connect error', error)