FIX: Speedrolling

master
U~man 2020-07-26 00:03:40 +02:00
parent 2574cc93f7
commit 6da300519a
3 changed files with 7 additions and 7 deletions

View File

@ -147,7 +147,7 @@ export class OseActorSheet extends ActorSheet {
data: { counter: { value: item.data.data.counter.value - 1 } }, data: { counter: { value: item.data.data.counter.value - 1 } },
}); });
} }
item.rollWeapon({ skipDialog: ev.ctrlKey }); item.rollWeapon({ skipDialog: ev.ctrlKey });
} else if (item.type == "spell") { } else if (item.type == "spell") {
item.spendSpell({ skipDialog: ev.ctrlKey }); item.spendSpell({ skipDialog: ev.ctrlKey });
} else { } else {

View File

@ -259,7 +259,7 @@ export class OseDice {
speaker: speaker, speaker: speaker,
}; };
if (skipDialog) { if (skipDialog) {
return data.roll.type === "attack" return ["melee", "missile", "attack"].includes(data.roll.type)
? OseDice.sendAttackRoll(rollData) ? OseDice.sendAttackRoll(rollData)
: OseDice.sendRoll(rollData); : OseDice.sendRoll(rollData);
} }
@ -271,7 +271,7 @@ export class OseDice {
callback: (html) => { callback: (html) => {
rolled = true; rolled = true;
rollData.form = html[0].children[0]; rollData.form = html[0].children[0];
roll = ["melee", "missile"].includes(data.roll.type) roll = ["melee", "missile", "attack"].includes(data.roll.type)
? OseDice.sendAttackRoll(rollData) ? OseDice.sendAttackRoll(rollData)
: OseDice.sendRoll(rollData); : OseDice.sendRoll(rollData);
}, },

View File

@ -67,7 +67,7 @@ export class OseItem extends Item {
rollWeapon(options = {}) { rollWeapon(options = {}) {
let isNPC = this.actor.data.type != "character"; let isNPC = this.actor.data.type != "character";
const data = this.data.data; const data = this.data.data;
let type = "melee"; let type = isNPC ? "attack" : "melee";
if (data.missile && data.melee && !isNPC) { if (data.missile && data.melee && !isNPC) {
// Dialog // Dialog
new Dialog({ new Dialog({
@ -86,7 +86,7 @@ export class OseItem extends Item {
save: this.data.data.save, save: this.data.data.save,
}, },
}, },
{ type: "melee" } { type: "melee", skipDialog: options.skipDialog }
); );
}, },
}, },
@ -102,7 +102,7 @@ export class OseItem extends Item {
actor: this.actor.data, actor: this.actor.data,
item: this.data, item: this.data,
}, },
{ type: "missile" } { type: "missile", skipDialog: options.skipDialog }
); );
}, },
}, },
@ -121,7 +121,7 @@ export class OseItem extends Item {
save: this.data.data.save, save: this.data.data.save,
}, },
}, },
{ type: type } { type: type, skipDialog: options.skipDialog }
); );
return true; return true;