aboutsummaryrefslogtreecommitdiff
path: root/internal/player/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/player/store.go')
-rw-r--r--internal/player/store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/player/store.go b/internal/player/store.go
index 5d69ec3..a0e2849 100644
--- a/internal/player/store.go
+++ b/internal/player/store.go
@@ -33,6 +33,7 @@ func (s *AccountStore) LoadAccount(name string) (*Account, error) {
if err := yaml.Unmarshal(data, &acc); err != nil {
return nil, fmt.Errorf("parse account: %w", err)
}
+ acc.Name = name
return &acc, nil
}
@@ -124,6 +125,7 @@ func (s *AccountStore) LoadCharacter(name string) (*Player, error) {
if err := yaml.Unmarshal(data, &p); err != nil {
return nil, fmt.Errorf("parse character: %w", err)
}
+ p.Name = name
if p.Skills == nil {
p.Skills = make(map[SkillName]int)
}