mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Fixed ActiveEffectConfig not opening because NPC was not excluded. Fixed active effects not being appliable to NPCs because they lack system.rules (#1956)
This commit is contained in:
parent
bfd483698b
commit
983f48b415
2 changed files with 2 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
||||||
* @returns {ChangeChoice { value: string, label: string, hint: string, group: string }[]}
|
* @returns {ChangeChoice { value: string, label: string, hint: string, group: string }[]}
|
||||||
*/
|
*/
|
||||||
static getChangeChoices() {
|
static getChangeChoices() {
|
||||||
const ignoredActorKeys = ['config', 'DhEnvironment', 'DhParty'];
|
const ignoredActorKeys = ['config', 'DhEnvironment', 'DhParty', 'DhNPC'];
|
||||||
|
|
||||||
const getAllLeaves = (root, group, parentPath = '') => {
|
const getAllLeaves = (root, group, parentPath = '') => {
|
||||||
const leaves = [];
|
const leaves = [];
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ export default class EffectsField extends fields.ArrayField {
|
||||||
if (!token) return;
|
if (!token) return;
|
||||||
|
|
||||||
const messageToken = token.document ?? token;
|
const messageToken = token.document ?? token;
|
||||||
const conditionImmunities = messageToken.actor.system.rules.conditionImmunities ?? {};
|
const conditionImmunities = messageToken.actor.system.rules?.conditionImmunities ?? {};
|
||||||
messageTargets.push({
|
messageTargets.push({
|
||||||
token: messageToken,
|
token: messageToken,
|
||||||
conditionImmunities: Object.values(conditionImmunities).some(x => x)
|
conditionImmunities: Object.values(conditionImmunities).some(x => x)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue