mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Player query for Roll All Save
This commit is contained in:
parent
36959156d0
commit
9674b90967
7 changed files with 21 additions and 131 deletions
|
|
@ -311,18 +311,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
type: 'reaction'
|
||||
},
|
||||
data: actor.getRollData()
|
||||
})
|
||||
/* .then(async result => {
|
||||
if (result) {
|
||||
const updateMsg = this.updateChatMessage.bind(this, message, target.id, {
|
||||
result: result.roll.total,
|
||||
success: result.roll.success
|
||||
});
|
||||
if (game.modules.get('dice-so-nice')?.active)
|
||||
game.dice3d.waitFor3DAnimationByMessageID(result.message.id).then(()=> updateMsg());
|
||||
else updateMsg();
|
||||
}
|
||||
}) */;
|
||||
});
|
||||
}
|
||||
|
||||
updateSaveMessage(result, message, targetId) {
|
||||
|
|
@ -334,6 +323,15 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
game.dice3d.waitFor3DAnimationByMessageID(result.message.id).then(()=> updateMsg());
|
||||
else updateMsg();
|
||||
}
|
||||
|
||||
static rollSaveQuery({ actionId, actorId, event, message }) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const actor = await fromUuid(actorId),
|
||||
action = await fromUuid(actionId);
|
||||
if (!actor || !actor?.isOwner) reject();
|
||||
action.rollSave(actor, event, message).then(result => resolve(result));
|
||||
});
|
||||
}
|
||||
/* SAVE */
|
||||
|
||||
async updateChatMessage(message, targetId, changes, chain = true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue