diff options
Diffstat (limited to 'internal/game/cmd_remove.go')
| -rw-r--r-- | internal/game/cmd_remove.go | 10 |
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 |
