mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Corrected updateActorsRangeDependentEffects when token is null
This commit is contained in:
parent
66c90d69e3
commit
e003db3ec1
1 changed files with 3 additions and 1 deletions
|
|
@ -355,12 +355,14 @@ Hooks.on(CONFIG.DH.HOOKS.hooksConfig.groupRollStart, async data => {
|
|||
});
|
||||
|
||||
const updateActorsRangeDependentEffects = async token => {
|
||||
if (!token) return;
|
||||
|
||||
const rangeMeasurement = game.settings.get(
|
||||
CONFIG.DH.id,
|
||||
CONFIG.DH.SETTINGS.gameSettings.variantRules
|
||||
).rangeMeasurement;
|
||||
|
||||
for (let effect of token.actor?.allApplicableEffects?.() ?? []) {
|
||||
for (let effect of token.actor?.allApplicableEffects() ?? []) {
|
||||
if (!effect.system.rangeDependence?.enabled) continue;
|
||||
const { target, range, type } = effect.system.rangeDependence;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue