simplify DS4Actor._getOriginatingItemOfActiveEffect
This commit is contained in:
parent
66334d338f
commit
4e2691e19f
1 changed files with 1 additions and 3 deletions
|
@ -83,9 +83,7 @@ export class DS4Actor extends Actor<DS4ActorData, DS4Item> {
|
|||
}
|
||||
|
||||
protected _getOriginatingItemOfActiveEffect(effect: ActiveEffect<DS4Actor>): 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue