mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed error where activeeffects were being created in the wrong place. Fixed error where characterCreation was failing subclass (#508)
This commit is contained in:
parent
66fc4e2854
commit
c2de25693f
2 changed files with 15 additions and 21 deletions
|
|
@ -416,17 +416,17 @@ export default function DHApplicationMixin(Base) {
|
|||
static async #createDoc(event, target) {
|
||||
const { documentClass, type, inVault, disabled } = target.dataset;
|
||||
const parentIsItem = this.document.documentName === 'Item';
|
||||
const parent =
|
||||
this.document.parent?.type === 'character'
|
||||
? this.document.parent
|
||||
: parentIsItem && documentClass === 'Item'
|
||||
? type === 'action'
|
||||
? this.document.system
|
||||
: null
|
||||
: this.document;
|
||||
const featureOnCharacter = this.document.parent?.type === 'character' && type === 'feature';
|
||||
const parent = featureOnCharacter
|
||||
? this.document.parent
|
||||
: parentIsItem && documentClass === 'Item'
|
||||
? type === 'action'
|
||||
? this.document.system
|
||||
: null
|
||||
: this.document;
|
||||
|
||||
let systemData = {};
|
||||
if (parent?.type === 'character' && type === 'feature') {
|
||||
if (featureOnCharacter) {
|
||||
systemData = {
|
||||
originItemType: this.document.type,
|
||||
originId: this.document.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue