forked from noxious/server
Added option to set rotation on teleport tiles, new base database migration (db reset needed)
This commit is contained in:
@ -23,14 +23,17 @@ export class ZoneEventTileService {
|
||||
data: {
|
||||
zoneId: newZoneId,
|
||||
positionX: teleport.toPositionX,
|
||||
positionY: teleport.toPositionY
|
||||
positionY: teleport.toPositionY,
|
||||
rotation: teleport.toRotation
|
||||
}
|
||||
})
|
||||
|
||||
// Update local character object
|
||||
character.zoneId = newZoneId
|
||||
character.rotation = teleport.toRotation
|
||||
character.positionX = teleport.toPositionX
|
||||
character.positionY = teleport.toPositionY
|
||||
character.isMoving = false
|
||||
|
||||
// Emit events
|
||||
io.to(oldZoneId.toString()).emit('zone:character:leave', character.id)
|
||||
|
@ -22,6 +22,7 @@ interface IPayload {
|
||||
toZoneId: number
|
||||
toPositionX: number
|
||||
toPositionY: number
|
||||
toRotation: number
|
||||
}
|
||||
}[]
|
||||
zoneObjects: ZoneObject[]
|
||||
@ -88,7 +89,8 @@ export default class ZoneUpdateEvent {
|
||||
create: {
|
||||
toZoneId: zoneEventTile.teleport.toZoneId,
|
||||
toPositionX: zoneEventTile.teleport.toPositionX,
|
||||
toPositionY: zoneEventTile.teleport.toPositionY
|
||||
toPositionY: zoneEventTile.teleport.toPositionY,
|
||||
toRotation: zoneEventTile.teleport.toRotation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user