1
0
forked from noxious/server

Redundant checks

This commit is contained in:
Dennis Postma 2025-02-16 19:16:50 +01:00
parent 4cf87536ce
commit f3e0d6e03a

View File

@ -25,8 +25,8 @@ class CharacterTeleportService {
const { socket, targetMap, mapCharacter } = await this.validateTeleportRequest(characterId, options)
if (!socket || !targetMap || !mapCharacter) return false
const currentMapId = mapCharacter.character.map?.id
const currentMap = MapManager.getMapById(currentMapId!)
const currentMapId = mapCharacter.character.map.id
const currentMap = MapManager.getMapById(currentMapId)
const io = SocketManager.getIO()
// Update character position and map