aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_use.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/action_use.go')
-rw-r--r--internal/game/action_use.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/game/action_use.go b/internal/game/action_use.go
index 69d29c1..497ceac 100644
--- a/internal/game/action_use.go
+++ b/internal/game/action_use.go
@@ -96,7 +96,9 @@ func (g *Game) advanceUse(sess *net.Session, p *player.Player) {
p.SetInvSlot(freeSlot, &player.InventorySlot{ItemID: cfg.Reward.ItemID, Quantity: qty})
if cfg.XP > 0 {
- p.AddXP(player.SkillName(cfg.Skill), cfg.XP)
+ if newLevel := p.AddSkillXP(player.SkillName(cfg.Skill), cfg.XP); newLevel > 0 {
+ sess.WriteLine(fmt.Sprintf("*** You are now level %d %s! ***", newLevel, cfg.Skill))
+ }
}
g.AccountStore.SaveCharacter(p)