From 6272585eb661ca807e90fd36773699a4a09d648f Mon Sep 17 00:00:00 2001 From: cadowtin Date: Sun, 15 Sep 2024 00:28:45 -0500 Subject: [PATCH] Fix issues with enabled --- scripts/hooks.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/hooks.js b/scripts/hooks.js index e382560..ab4d7b2 100644 --- a/scripts/hooks.js +++ b/scripts/hooks.js @@ -37,12 +37,14 @@ export async function preDeleteCombat(encounter, _changed, _userid) { const xp = game.pf2e.gm.calculateXP(partyCombatLevel, partyCombatMembers.length, enemyLevels, hazardLevels, {}); // Trigger animation if conditions are met - if (getSetting('from-software.noun-verbed.enable') && xp >= xpNeeded) { + if (getSetting('from-software.noun-verbed.enabled') && xp >= xpNeeded) { await eldenRingNounVerbed(); } } export async function applyTokenStatusEffect(token, status, isAdd) { - if (status == 'dead' && isAdded && getSetting('from-software.death.enable')) { + // Only proceed if the user is a GM + if (!game.user.isGM) return; + if (status == 'dead' && isAdded && getSetting('from-software.death.enabled')) { const userId = game.users.find(c => c?.character?.uuid == token?.actor?.uuid)?.id if (userId) { await eldenRingDeath({ users: [userId] })