Send new location as array instead of object

This commit is contained in:
Dennis Postma 2025-02-16 17:19:14 +01:00
parent 049456cc40
commit 562935c6e8

View File

@ -17,7 +17,7 @@ export default class CharacterMove extends BaseEvent {
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 {
const mapCharacter = MapManager.getCharacterById(this.socket.characterId!)
if (!mapCharacter?.getCharacter()) return