Fixed emits
This commit is contained in:
parent
bdd2f93175
commit
ae0841889b
@ -41,20 +41,20 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function fetchMaps() {
|
function fetchMaps() {
|
||||||
gameStore.connection?.emit('gm:mapObject:list', {}, (response: Map[]) => {
|
gameStore.connection?.emit('gm:map:list', {}, (response: Map[]) => {
|
||||||
mapEditorStore.setMapList(response)
|
mapEditorStore.setMapList(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadMap(id: number) {
|
function loadMap(id: number) {
|
||||||
gameStore.connection?.emit('gm:mapObject:request', { mapId: id }, (response: Map) => {
|
gameStore.connection?.emit('gm:map:request', { mapId: id }, (response: Map) => {
|
||||||
mapEditorStore.setMap(response)
|
mapEditorStore.setMap(response)
|
||||||
})
|
})
|
||||||
mapEditorStore.toggleMapListModal()
|
mapEditorStore.toggleMapListModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteMap(id: number) {
|
function deleteMap(id: number) {
|
||||||
gameStore.connection?.emit('gm:mapObject:delete', { mapId: id }, () => {
|
gameStore.connection?.emit('gm:map:delete', { mapId: id }, () => {
|
||||||
fetchMaps()
|
fetchMaps()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user