aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_use.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-12 23:52:06 -0400
committerhistoria <[not public]>2026-06-12 23:52:06 -0400
commita19e6b6ab01670a5932308c7bd0e0e5eed8cbcad (patch)
tree80a2e46c3e6cc98bb8b4f708cc403949b14742eb /internal/game/action_use.go
parentf3a6ae488bbd2128af8356b0da016699c5abb70e (diff)
downloadthehouseoficarus-a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad.tar.gz
feat: firemaking skill implemented. overhauled how ground items and despawn are handled.
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)