Player query for Roll All Save

This commit is contained in:
Dapoolp 2025-07-28 13:44:31 +02:00
parent 36959156d0
commit 9674b90967
7 changed files with 21 additions and 131 deletions

View file

@ -1,5 +1,4 @@
import DamageReductionDialog from '../applications/dialogs/damageReductionDialog.mjs';
import ReactionRollDialog from '../applications/dialogs/reactionRollDialog.mjs';
export function handleSocketEvent({ action = null, data = {} } = {}) {
switch (action) {
@ -74,18 +73,7 @@ export const registerSocketHooks = () => {
export const registerUserQueries = () => {
CONFIG.queries.armorStack = DamageReductionDialog.armorStackQuery;
// CONFIG.queries.reactionRoll = ReactionRollDialog.reactionRollQuery;
CONFIG.queries.reactionRoll = ({ actionId, actorId, event, message }) => {
// console.log('reactionRoll')
return new Promise(async (resolve, reject) => {
// resolve()
const actor = await fromUuid(actorId),
action = await fromUuid(actionId);
if (!actor || !actor?.isOwner) reject();
action.rollSave(actor, event, message).then(result => resolve(result));
// new ReactionRollDialog(resolve, reject, actor, trait).render({ force: true });
});
}
CONFIG.queries.reactionRoll = game.system.api.models.actions.actionsTypes.base.rollSaveQuery;
}
export const emitAsGM = async (eventName, callback, update, uuid = null) => {