Fixed various action calling issues
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -101,7 +101,6 @@ export default {
|
||||
elementId: this.dataId,
|
||||
task: {
|
||||
subtaskFn: 'damageProp',
|
||||
prop: model,
|
||||
targetIds: [model.root.id],
|
||||
params: {
|
||||
title: getPropertyTitle(model),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user