diff --git a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue index d2082065..b3ec50d2 100644 --- a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue +++ b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue @@ -611,11 +611,12 @@ export default { }, incrementChange(_id, { type, value, ack }) { const model = CreatureProperties.findOne(_id); + if (!model) return; if (type === 'increment') value = -value; doAction({ creatureId: model.root.id, $store: this.$store, - elementId: `${model._id}-${type}`, + elementId: `${model._id}`, task: { subtaskFn: 'damageProp', targetIds: [model.root.id], diff --git a/app/imports/client/ui/properties/components/actions/ActionCard.vue b/app/imports/client/ui/properties/components/actions/ActionCard.vue index ab3dfce4..d28c55db 100644 --- a/app/imports/client/ui/properties/components/actions/ActionCard.vue +++ b/app/imports/client/ui/properties/components/actions/ActionCard.vue @@ -229,6 +229,7 @@ export default { creatureId: this.model.root.id, $store: this.$store, elementId: `${this.model._id}-do-action-button`, + targetIds: [], }).catch((e) => { console.error(e); }).finally(() => { diff --git a/app/imports/client/ui/properties/components/actions/EventButton.vue b/app/imports/client/ui/properties/components/actions/EventButton.vue index 518c1598..873d4b45 100644 --- a/app/imports/client/ui/properties/components/actions/EventButton.vue +++ b/app/imports/client/ui/properties/components/actions/EventButton.vue @@ -50,6 +50,7 @@ export default { creatureId: this.model.root.id, $store: this.$store, elementId: `event-btn-${this.model._id}`, + targetIds: [], }).catch(error => { snackbar({ text: error.reason || error.message || error.toString() }); console.error(error); diff --git a/app/imports/client/ui/properties/components/attributes/AbilityListTile.vue b/app/imports/client/ui/properties/components/attributes/AbilityListTile.vue index cf72c96e..5e284ecd 100644 --- a/app/imports/client/ui/properties/components/attributes/AbilityListTile.vue +++ b/app/imports/client/ui/properties/components/attributes/AbilityListTile.vue @@ -98,7 +98,6 @@ export default { elementId: `check-btn-${this.model._id}`, task: { subtaskFn: 'check', - prop: this.model, targetIds: [this.model.root.id], advantage: this.model.advantage, skillVariableName: undefined, diff --git a/app/imports/client/ui/properties/components/attributes/AttributeCardContent.vue b/app/imports/client/ui/properties/components/attributes/AttributeCardContent.vue index c5db95f4..6b3c6aa5 100644 --- a/app/imports/client/ui/properties/components/attributes/AttributeCardContent.vue +++ b/app/imports/client/ui/properties/components/attributes/AttributeCardContent.vue @@ -83,7 +83,6 @@ export default { elementId: `check-btn-${this.model._id}`, task: { subtaskFn: 'check', - prop: this.model, targetIds: [this.model.root.id], advantage: this.model.advantage, skillVariableName: this.model.variableName, diff --git a/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue b/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue index 1455ff17..b08acf7b 100644 --- a/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue +++ b/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue @@ -121,7 +121,6 @@ export default { elementId: `spell-slot-list-tile-${model._id}`, task: { subtaskFn: 'damageProp', - prop: model, targetIds: [model.root.id], params: { title: getPropertyTitle(model), diff --git a/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue b/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue index 663272d6..af8292ae 100644 --- a/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue +++ b/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue @@ -101,7 +101,6 @@ export default { elementId: this.dataId, task: { subtaskFn: 'damageProp', - prop: model, targetIds: [model.root.id], params: { title: getPropertyTitle(model), diff --git a/app/imports/client/ui/properties/components/skills/SkillListTile.vue b/app/imports/client/ui/properties/components/skills/SkillListTile.vue index 99487af2..f3452438 100644 --- a/app/imports/client/ui/properties/components/skills/SkillListTile.vue +++ b/app/imports/client/ui/properties/components/skills/SkillListTile.vue @@ -110,7 +110,6 @@ export default { elementId: `check-btn-${this.model._id}`, task: { subtaskFn: 'check', - prop: this.model, targetIds: [this.model.root.id], advantage: this.model.advantage, skillVariableName: this.model.variableName, diff --git a/app/imports/client/ui/properties/components/spells/CastSpellWithSlotDialog.vue b/app/imports/client/ui/properties/components/spells/CastSpellWithSlotDialog.vue index c9feb198..59a902ff 100644 --- a/app/imports/client/ui/properties/components/spells/CastSpellWithSlotDialog.vue +++ b/app/imports/client/ui/properties/components/spells/CastSpellWithSlotDialog.vue @@ -360,12 +360,17 @@ export default { const withoutSpellSlot = slotId === 'no-slot'; if (ritual || withoutSpellSlot) slotId = undefined; const $store = this.$store; + const spell = CreatureProperties.findOne(spellId); + if (!spell || spell.type !== 'spell') { + return; + } doAction({ creatureId: this.creatureId, $store, task: { subtaskFn: 'castSpell', - prop: CreatureProperties.findOne(spellId), + prop: spell, + targetIds: [], params: { slotId, ritual, diff --git a/app/imports/client/ui/properties/viewers/ActionViewer.vue b/app/imports/client/ui/properties/viewers/ActionViewer.vue index 2c9127ba..e2ec51f5 100644 --- a/app/imports/client/ui/properties/viewers/ActionViewer.vue +++ b/app/imports/client/ui/properties/viewers/ActionViewer.vue @@ -203,6 +203,7 @@ export default { $store: this.$store, propId: this.model._id, elementId: 'do-action-button', + targetIds: [], }).catch((e) => { console.error(e); snackbar({ text: e.message || e.reason || e.toString() }); diff --git a/app/imports/client/ui/properties/viewers/AttributeViewer.vue b/app/imports/client/ui/properties/viewers/AttributeViewer.vue index 7867969c..40dea5ef 100644 --- a/app/imports/client/ui/properties/viewers/AttributeViewer.vue +++ b/app/imports/client/ui/properties/viewers/AttributeViewer.vue @@ -40,6 +40,7 @@ icon tile color="primary" + :data-id="`${model._id}-increment`" :value="model.value" :loading="damagePropertyLoading" @change="damageProperty" @@ -212,16 +213,20 @@ import getPropertyTitle from '/imports/client/ui/properties/shared/getPropertyTi damageProperty({ type, value }) { const model = this.model; this.damagePropertyLoading = true; - doAction(model, this.$store, model._id, { - subtaskFn: 'damageProp', - prop: model, - targetIds: [model.root.id], - params: { - title: getPropertyTitle(model), - operation: type, - value, - targetProp: model, - } + doAction({ + creatureId: model.root.id, + $store: this.$store, + elementId: `${model._id}-increment`, + task: { + subtaskFn: 'damageProp', + targetIds: [model.root.id], + params: { + title: getPropertyTitle(model), + operation: type, + value, + targetProp: model, + }, + }, }).catch((error) => { snackbar({ text: error.reason || error.message || error.toString() }); console.error(error); diff --git a/app/imports/client/ui/tabletop/TabletopBuffCard.vue b/app/imports/client/ui/tabletop/TabletopBuffCard.vue index 531f994e..2d034bb7 100644 --- a/app/imports/client/ui/tabletop/TabletopBuffCard.vue +++ b/app/imports/client/ui/tabletop/TabletopBuffCard.vue @@ -168,6 +168,7 @@ export default { creatureId: this.model.root.id, $store: this.$store, elementId: 'do-action-button', + targetIds: [], }).catch((e) => { console.error(e); snackbar({ text: e.message || e.reason || e.toString() });