Skip to content

Commit

Permalink
Fix talents being added via character sheet not applying their effects
Browse files Browse the repository at this point in the history
Fixes #1206
  • Loading branch information
moo-man committed Aug 30, 2022
1 parent af566e4 commit c30a522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/actor/sheet/character-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default class ActorSheetWfrp4eCharacter extends ActorSheetWfrp4e {
callback: dlg => {
try {
WFRP_Utility.checkValidAdvancement(this.actor.details.experience.total, this.actor.details.experience.spent + 100, game.i18n.localize("ACTOR.ErrorAdd"), talent.name);
this.actor.createEmbeddedDocuments("Item", [talent.data]);
this.actor.createEmbeddedDocuments("Item", [talent.toObject()]);
let expLog = duplicate(this.actor.details.experience.log || [])
expLog.push({amount : 100, reason : talent.name, spent : this.actor.details.experience.spent + 100, total : this.actor.details.experience.total, type : "spent"})
ui.notifications.notify(game.i18n.format("ACTOR.SpentExp", {amount : 100, reason : talent.name}))
Expand All @@ -278,7 +278,7 @@ export default class ActorSheetWfrp4eCharacter extends ActorSheetWfrp4e {
yesNoExp:
{
label: game.i18n.localize("Free"),
callback: dlg => { this.actor.createEmbeddedDocuments("Item", [talent.data]); }
callback: dlg => { this.actor.createEmbeddedDocuments("Item", [talent.toObject()]); }
},
cancel:
{
Expand Down

0 comments on commit c30a522

Please sign in to comment.