Fix scripts !
This commit is contained in:
@@ -27,7 +27,7 @@ else
|
||||
|
||||
if (choice.length)
|
||||
{
|
||||
let changes = foundry.utils.deepClone(this.effet.changes);
|
||||
let changes = foundry.utils.deepClone(this.effect.changes);
|
||||
|
||||
for(let training of choice)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ if (choice.length)
|
||||
|
||||
case "guard" :
|
||||
let territorial = await fromUuid("Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do");
|
||||
await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effet.id})
|
||||
await this.actor.createEmbeddedDocuments("Item", [territorial], {fromEffect: this.effect.id})
|
||||
foundry.utils.setProperty(args, "options.keepId", true);
|
||||
break;
|
||||
|
||||
@@ -83,6 +83,6 @@ if (choice.length)
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.effet.updateSource({name : `${this.effet.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)})
|
||||
this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(", ")})`, changes, "flags.wfrp4e.trained" : choice.map(i => i.id)})
|
||||
this.item.updateSource({"system.specification.value" : `${choice.map(i => i.name).join(", ")}`})
|
||||
}
|
||||
Reference in New Issue
Block a user