summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game-server/inventory.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index d3e3321d..8ed39c9f 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -521,7 +521,15 @@ int Inventory::move(int slot1, int slot2, int amount)
return amount;
}
- assert(false);
+ // The second slot does not yet exist.
+ assert(slot2 >= 0);
+ if (slot2 != 0)
+ {
+ InventoryItem it = { 0, slot2 };
+ mPoss->inventory.insert(mPoss->inventory.end(), it);
+ }
+ InventoryItem it = { id, nb };
+ mPoss->inventory.insert(mPoss->inventory.end(), it);
return amount;
}