diff options
| author | historia <[not public]> | 2026-06-12 23:52:06 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-12 23:52:06 -0400 |
| commit | a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad (patch) | |
| tree | 80a2e46c3e6cc98bb8b4f708cc403949b14742eb /internal/game/cmd_wear.go | |
| parent | f3a6ae488bbd2128af8356b0da016699c5abb70e (diff) | |
| download | thehouseoficarus-a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad.tar.gz | |
feat: firemaking skill implemented. overhauled how ground items and despawn are handled.
Diffstat (limited to 'internal/game/cmd_wear.go')
| -rw-r--r-- | internal/game/cmd_wear.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/game/cmd_wear.go b/internal/game/cmd_wear.go index c4b5d12..4554dfc 100644 --- a/internal/game/cmd_wear.go +++ b/internal/game/cmd_wear.go @@ -62,6 +62,13 @@ func (g *Game) doWear(sess *net.Session, input string) { p.SetInvSlot(match.Slot, nil) } + if slot.Quality > 0 && slot.MaxQuality > 0 { + if p.EquipQuality == nil { + p.EquipQuality = make(map[string]int) + } + p.EquipQuality[slot.ItemID] = slot.Quality + } + p.Equipment[def.EquipSlot] = slot.ItemID g.AccountStore.SaveCharacter(p) @@ -127,6 +134,13 @@ func (g *Game) doWearAll(sess *net.Session) { p.SetInvSlot(best.invSlot, nil) } + if invSlot != nil && invSlot.Quality > 0 && invSlot.MaxQuality > 0 { + if p.EquipQuality == nil { + p.EquipQuality = make(map[string]int) + } + p.EquipQuality[best.itemID] = invSlot.Quality + } + p.Equipment[eqSlot] = best.itemID def, _ := g.ItemStore.Load(best.itemID) name := best.itemID |
