diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game-server/inventory.cpp | 6 |
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) |