forked from noxious/server
Send new location as array instead of object
This commit is contained in:
parent
049456cc40
commit
562935c6e8
@ -17,7 +17,7 @@ export default class CharacterMove extends BaseEvent {
|
|||||||
this.socket.on(SocketEvent.MAP_CHARACTER_MOVE, this.handleEvent.bind(this))
|
this.socket.on(SocketEvent.MAP_CHARACTER_MOVE, this.handleEvent.bind(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleEvent({ positionX, positionY }: { positionX: number; positionY: number }): Promise<void> {
|
private async handleEvent([positionX, positionY]: [number, number]): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const mapCharacter = MapManager.getCharacterById(this.socket.characterId!)
|
const mapCharacter = MapManager.getCharacterById(this.socket.characterId!)
|
||||||
if (!mapCharacter?.getCharacter()) return
|
if (!mapCharacter?.getCharacter()) return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user