1
0
forked from noxious/server

Fixed char move

This commit is contained in:
2024-09-09 20:50:14 +02:00
parent 839fec1c06
commit 293b2be919
5 changed files with 12 additions and 39 deletions

View File

@ -26,7 +26,7 @@ export class CharacterMoveService {
}
public async calculatePath(character: ExtendedCharacter, targetX: number, targetY: number): Promise<Array<{ x: number; y: number }> | null> {
const grid = await ZoneManager.getGrid(character.zoneId)
const grid = await ZoneManager.getZoneById(character.zoneId)?.getGrid()
if (!grid?.length) {
logger.error('character:move error', 'Grid not found or empty')
return null