Skip to content

Commit

Permalink
Merge pull request #265 from IrishWolf/fixx-264
Browse files Browse the repository at this point in the history
fixx for #264
  • Loading branch information
AlexOkafor committed Apr 22, 2024
2 parents 9b11175 + 2f99f73 commit 10ee0ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ export const migrateBlastPower = function(itemData) {
};

export const migrateTalentBonus = function(itemData) {
if (itemData.system.hpBonus) {
if (!itemData.compendium?.locked && itemData.system.hpBonus) {
let keyHpMod = getID();
let nameHpMod = ["si" + keyHpMod];
itemData.update({"system.itemModifiers": {nameHpMod: {"mod": "itemModifierHP", "value": itemData.system.hpBonus}}});
itemData.update({"system.hpBonus": null});
}
if (itemData.system.mpBonus) {
if (!itemData.compendium?.locked && itemData.system.mpBonus) {
let keyMpMod = getID();
let nameMpMod = ["si" + keyMpMod];
itemData.update({"system.itemModifiers": {nameMpMod: {"mod": "itemModifierMP", "value": itemData.system.mpBonus}}});
Expand Down

0 comments on commit 10ee0ea

Please sign in to comment.