diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/game-server/inventory.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -16,6 +16,7 @@ * src/game-server/testing.cpp: Added a piece of equipment. * src/game-server/defines.h, src/game-server/gamehandler.cpp: Implemented item dropping. + * src/inventory.cpp: Fixed reported amounts of inventory items. 2007-01-04 Guillaume Melquiond <guillaume.melquiond@gmail.com> @@ -53,7 +54,7 @@ * accountserver.cbp, gameserver.cbp: Updated project files. * src/game-server/state.cpp: Fix to Windows Rectangle redefinition. -2007-01-03 Björn Steinbrink <B.Steinbrink@gmx.de> +2007-01-03 Björn Steinbrink <B.Steinbrink@gmx.de> * src/utils/timer.cpp: Removed extra semicolons that break builds with --pedantic. 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) |