summaryrefslogtreecommitdiff
path: root/src/game-server/inventory.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-05 10:10:40 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-05 10:10:40 +0000
commitdbbc5a744bb687a9e9098de1204a553faaef5b49 (patch)
tree5d766f7cb5114a3c1dee44edee4a0ab6d9f6d888 /src/game-server/inventory.cpp
parentc14e8075938da01140ac307b66b69f749be133d6 (diff)
downloadmanaserv-dbbc5a744bb687a9e9098de1204a553faaef5b49.tar.gz
manaserv-dbbc5a744bb687a9e9098de1204a553faaef5b49.tar.bz2
manaserv-dbbc5a744bb687a9e9098de1204a553faaef5b49.tar.xz
manaserv-dbbc5a744bb687a9e9098de1204a553faaef5b49.zip
Fixed reported amounts of inventory items.
Diffstat (limited to 'src/game-server/inventory.cpp')
-rw-r--r--src/game-server/inventory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index d2615f66..f1c2eabd 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -147,7 +147,7 @@ int Inventory::insert(int itemId, int amount)
msg.writeByte(slot + EQUIP_CLIENT_INVENTORY);
msg.writeShort(itemId);
- msg.writeByte(nb);
+ msg.writeByte(i->amount);
if (amount == 0)
{
@@ -221,7 +221,7 @@ int Inventory::remove(int itemId, int amount)
msg.writeByte(getSlot(i) + EQUIP_CLIENT_INVENTORY);
msg.writeShort(itemId);
- msg.writeByte(nb);
+ msg.writeByte(it.amount);
// If the slot is empty, compress the inventory.
if (it.amount == 0)
@@ -255,7 +255,7 @@ int Inventory::removeFromSlot(int slot, int amount)
msg.writeByte(slot + EQUIP_CLIENT_INVENTORY);
msg.writeShort(it.itemId);
- msg.writeByte(nb);
+ msg.writeByte(it.amount);
// If the slot is empty, compress the inventory.
if (it.amount == 0)