From 4e2691e19f3abe7c43f322a8d8f11b9f021cf232 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Tue, 16 Feb 2021 14:52:22 +0100 Subject: [PATCH] simplify DS4Actor._getOriginatingItemOfActiveEffect --- src/module/actor/actor.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/module/actor/actor.ts b/src/module/actor/actor.ts index 6a674cd..c912316 100644 --- a/src/module/actor/actor.ts +++ b/src/module/actor/actor.ts @@ -83,9 +83,7 @@ export class DS4Actor extends Actor { } protected _getOriginatingItemOfActiveEffect(effect: ActiveEffect): DS4Item | undefined { - const re = /.*OwnedItem\.(.*)/; - const id = effect.data.origin?.match(re)?.[1] ?? ""; - const item = this.items.find((item) => item.id === id); + const item = this.items.find((item) => item.uuid === effect.data.origin); return item ?? undefined; }