aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_remove.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/cmd_remove.go
parentf3a6ae488bbd2128af8356b0da016699c5abb70e (diff)
downloadthehouseoficarus-a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad.tar.gz
feat: firemaking skill implemented. overhauled how ground items and despawn are handled.
Diffstat (limited to 'internal/game/cmd_remove.go')
-rw-r--r--internal/game/cmd_remove.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/game/cmd_remove.go b/internal/game/cmd_remove.go
index 9f0cbe8..f511ec4 100644
--- a/internal/game/cmd_remove.go
+++ b/internal/game/cmd_remove.go
@@ -56,7 +56,15 @@ func (g *Game) doRemove(sess *net.Session, input string) {
}
delete(p.Equipment, foundSlot)
- p.SetInvSlot(freeSlot, &player.InventorySlot{ItemID: foundItemID, Quantity: 1})
+ invSlot := &player.InventorySlot{ItemID: foundItemID, Quantity: 1}
+ if q, ok := p.EquipQuality[foundItemID]; ok {
+ invSlot.Quality = q
+ if def, _ := g.ItemStore.Load(foundItemID); def != nil {
+ invSlot.MaxQuality = def.MaxQuality
+ }
+ delete(p.EquipQuality, foundItemID)
+ }
+ p.SetInvSlot(freeSlot, invSlot)
g.AccountStore.SaveCharacter(p)
name := foundItemID