Added back the save function

This commit is contained in:
WBHarry 2025-05-28 21:16:45 +02:00
parent cc0766fc20
commit 6eedc92e8c
2 changed files with 5 additions and 2 deletions

View file

@ -90,7 +90,10 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
static async save() {
await this.actor.update({
'system.levelData.selections': [{ tier: 1, level: 2, type: 'hitPoint', checkboxNr: 1 }]
'system.levelData': {
'level.current': this.actor.system.levelData.level.changed,
'selections': this.levelup.playerData
}
});
this.close();

View file

@ -8,7 +8,7 @@ export class DhLevelup extends foundry.abstract.DataModel {
tiers: Object.keys(levelTierData.tiers).reduce((acc, key) => {
acc[key] = DhLevelupTier.initializeData(
levelTierData.tiers[key],
pcLevelData.selections.filter(x => x.tier === key),
pcLevelData.selections.filter(x => x.tier === Number(key)),
pcLevelData.level.changed
);