diff --git a/module/documents/actor/actor.mjs b/module/documents/actor/actor.mjs index d3e824a38f..d8c34b5611 100644 --- a/module/documents/actor/actor.mjs +++ b/module/documents/actor/actor.mjs @@ -182,7 +182,7 @@ export default class Actor5e extends Actor { data.classes = {}; for ( const [identifier, cls] of Object.entries(this.classes) ) { - data.classes[identifier] = cls.system; + data.classes[identifier] = foundry.utils.deepClone(cls.system); if ( cls.subclass ) data.classes[identifier].subclass = cls.subclass.system; } return data; diff --git a/module/documents/item.mjs b/module/documents/item.mjs index a7a512f03c..224c26f99f 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -147,7 +147,7 @@ export default class Item5e extends Item { get class() { if ( !this.isEmbedded || (this.type !== "subclass") ) return null; const cid = this.system.classIdentifier; - return this._classLink ??= this.parent.items.find(i => (i.type === "class") && (i.system.identifier === cid)); + return this._classLink ??= this.parent.items.find(i => (i.type === "class") && (i.identifier === cid)); } /* -------------------------------------------- */ @@ -159,7 +159,7 @@ export default class Item5e extends Item { get subclass() { if ( !this.isEmbedded || (this.type !== "class") ) return null; const items = this.parent.items; - const cid = this.system.identifier; + const cid = this.identifier; return this._classLink ??= items.find(i => (i.type === "subclass") && (i.system.classIdentifier === cid)); } diff --git a/templates/items/class.hbs b/templates/items/class.hbs index 8aeaeb4bfc..1b6bbc2d43 100644 --- a/templates/items/class.hbs +++ b/templates/items/class.hbs @@ -45,10 +45,11 @@
- {{{localize "DND5E.ClassIdentifierHint" identifier=system.identifier}}} + {{{localize "DND5E.ClassIdentifierHint" identifier=item.identifier}}}