Refractored MVP for teleport

This commit is contained in:
2024-08-26 21:56:10 +02:00
parent 1aa3d1a208
commit 89cca1d0f8
2 changed files with 13 additions and 4 deletions

View File

@ -65,6 +65,7 @@ export default class CharacterMoveEvent {
if (zoneEventTile) {
await this.handleZoneEventTile(zoneEventTile)
break
}
await this.characterMoveService.updatePosition(character, position)
@ -85,8 +86,7 @@ export default class CharacterMoveEvent {
const teleport = zoneEventTile.teleport
if (teleport) {
await this.characterMoveService.updatePosition(character, { x: teleport.toPositionX, y: teleport.toPositionY }, teleport.toZoneId)
await this.zoneEventTileService.handleTeleport(this.socket, character, teleport)
await this.zoneEventTileService.handleTeleport(this.io, this.socket, character, teleport)
return
}
}