aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_get.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_get.go')
-rw-r--r--internal/game/cmd_get.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_get.go b/internal/game/cmd_get.go
index 70b458e..f4c7426 100644
--- a/internal/game/cmd_get.go
+++ b/internal/game/cmd_get.go
@@ -96,7 +96,7 @@ func (g *Game) doGet(sess *net.Session, input string) {
return
}
_ = removed
- p.SetInvSlot(freeSlot, &player.InventorySlot{ItemID: itemID, Quantity: qty})
+ p.SetInvSlot(freeSlot, g.newInvSlot(itemID, qty))
g.AccountStore.SaveCharacter(p)
if qty == 1 {
sess.WriteLine(fmt.Sprintf("You pick up a %s.", def.Name))
@@ -329,7 +329,7 @@ func (g *Game) doGetAll(sess *net.Session) {
if !ok {
break
}
- p.SetInvSlot(freeSlot, &player.InventorySlot{ItemID: itemID, Quantity: qty})
+ p.SetInvSlot(freeSlot, g.newInvSlot(itemID, qty))
name := itemID
if def != nil {
name = def.Name