Remove hair works again
This commit is contained in:
parent
66fc6d8b43
commit
78daac9d95
@ -37,7 +37,7 @@ export default class CharacterConnectEvent extends BaseEvent {
|
||||
this.socket.characterId = character.id
|
||||
|
||||
// Set character hair
|
||||
if (data.characterHairId !== undefined && data.characterHairId !== null) {
|
||||
if (data.characterHairId !== undefined) {
|
||||
const characterHair = await this.characterHairRepository.getById(data.characterHairId)
|
||||
await character.setCharacterHair(characterHair).save()
|
||||
}
|
||||
@ -62,7 +62,7 @@ export default class CharacterConnectEvent extends BaseEvent {
|
||||
}
|
||||
|
||||
private async checkForActiveCharacters(): Promise<boolean> {
|
||||
const characters = await this.characterRepository.getByUserId(this.socket.userId)
|
||||
const characters = await this.characterRepository.getByUserId(this.socket.userId!)
|
||||
return characters?.some((char) => MapManager.getCharacterById(char.id)) ?? false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user