aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_drop.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_drop.go')
-rw-r--r--internal/game/cmd_drop.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/game/cmd_drop.go b/internal/game/cmd_drop.go
index 674f3da..072f54a 100644
--- a/internal/game/cmd_drop.go
+++ b/internal/game/cmd_drop.go
@@ -55,7 +55,7 @@ func (g *Game) doDropAllNamed(sess *net.Session, input string) {
qty := slot.Quantity
p.SetInvSlot(matches[0].Slot, nil)
g.World.AddGroundItem(p.RoomID, itemID, qty)
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
if qty == 1 {
sess.WriteLine(fmt.Sprintf("You drop a %s.", coloredName))
} else {
@@ -74,7 +74,7 @@ func (g *Game) doDropAllNamed(sess *net.Session, input string) {
p.SetInvSlot(match.Slot, nil)
g.World.AddGroundItem(p.RoomID, itemID, slot.Quantity)
}
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
if total == 1 {
sess.WriteLine(fmt.Sprintf("You drop a %s.", coloredName))
} else {
@@ -138,7 +138,7 @@ func (g *Game) doDrop(sess *net.Session, input string) {
p.SetInvSlot(matches[0].Slot, nil)
}
g.World.AddGroundItem(p.RoomID, itemID, qty)
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
if qty == 1 {
sess.WriteLine(fmt.Sprintf("You drop a %s.", g.itemColorize(sess, def, name)))
} else {
@@ -167,7 +167,7 @@ func (g *Game) doDrop(sess *net.Session, input string) {
}
dropped := qty - remaining
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
if dropped == 0 {
sess.WriteLine(fmt.Sprintf("You don't have any %s.", g.itemColorize(sess, def, name)))
} else if dropped == 1 {
@@ -223,7 +223,7 @@ func (g *Game) handleDropAll(sess *net.Session, input string) {
p.SetInvSlot(i, nil)
}
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
sess.State = net.StateGame
if len(dropped) == 0 {