forked from noxious/client
Added characterChest component for chest equipment, moved some files
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import type { ZoneCharacter, Zone } from '@/types'
|
||||
import type { ZoneCharacter, Zone } from '@/application/types'
|
||||
|
||||
export const useZoneStore = defineStore('zone', {
|
||||
state: () => {
|
||||
@ -40,6 +40,15 @@ export const useZoneStore = defineStore('zone', {
|
||||
setCharacterLoaded(loaded: boolean) {
|
||||
this.characterLoaded = loaded
|
||||
},
|
||||
updateCharacterPosition(data: { id: number, positionX: number, positionY: number, rotation: number, isMoving: boolean }) {
|
||||
const character = this.characters.find(char => char.character.id === data.id)
|
||||
if (character) {
|
||||
character.character.positionX= data.positionX
|
||||
character.character.positionY = data.positionY
|
||||
character.character.rotation = data.rotation
|
||||
character.isMoving = data.isMoving
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.zone = null
|
||||
this.characters = []
|
||||
|
Reference in New Issue
Block a user