From d27458ac0d0ddb51436d5487e34e1bef5bfa99bb Mon Sep 17 00:00:00 2001 From: Jeff Hitchcock Date: Tue, 23 Aug 2022 14:57:57 -0700 Subject: [PATCH] [#1407] Change advancement origin to use new advancement UUID --- module/advancement/advancement-manager.mjs | 2 +- module/advancement/types/subclass.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/advancement/advancement-manager.mjs b/module/advancement/advancement-manager.mjs index 282f41c826..2c5c420efa 100644 --- a/module/advancement/advancement-manager.mjs +++ b/module/advancement/advancement-manager.mjs @@ -33,7 +33,7 @@ export default class AdvancementManager extends Application { * A clone of the original actor to which the changes can be applied during the advancement process. * @type {Actor5e} */ - this.clone = actor.clone(); + this.clone = actor.clone({}, {keepId: true}); /** * Individual steps that will be applied in order. diff --git a/module/advancement/types/subclass.mjs b/module/advancement/types/subclass.mjs index 6cf93afe1b..777e63b925 100644 --- a/module/advancement/types/subclass.mjs +++ b/module/advancement/types/subclass.mjs @@ -71,7 +71,7 @@ export class SubclassAdvancement extends Advancement { _id: foundry.utils.randomID(), "system.classIdentifier": this.item.identifier, "flags.dnd5e.sourceId": data.uuid, - "flags.dnd5e.advancementOrigin": `${this.item.id}.${this.id}` + "flags.dnd5e.advancementOrigin": this.uuid }, {keepId: true}).toObject(); } this.actor.updateSource({ items: [itemData] });