summaryrefslogtreecommitdiff
path: root/src/net/inventoryhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
commita5e6a44b51d4269ed6812c9a9e0b6a293d959a4d (patch)
treef269a803b58b47082156dc74bb0d6e8e2dc6519e /src/net/inventoryhandler.cpp
parent1f6975d34e2c6fe8404fcbe13da406e624d94b68 (diff)
downloadMana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.gz
Mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.bz2
Mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.xz
Mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.zip
Renamed {read,write}{Byte,Short,Long} to {read,write}{Int8,Int16,Int32}. This
is less confusing in 64-bit context and less conflicting with the 0.0 client.
Diffstat (limited to 'src/net/inventoryhandler.cpp')
-rw-r--r--src/net/inventoryhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp
index 6fdb827d..d48a77a5 100644
--- a/src/net/inventoryhandler.cpp
+++ b/src/net/inventoryhandler.cpp
@@ -58,21 +58,21 @@ void InventoryHandler::handleMessage(MessageIn &msg)
case GPMSG_INVENTORY:
while (msg.getUnreadLength())
{
- int slot = msg.readByte();
+ int slot = msg.readInt8();
if (slot == 255)
{
- player_node->setMoney(msg.readLong());
+ player_node->setMoney(msg.readInt32());
continue;
}
- int id = msg.readShort();
+ int id = msg.readInt16();
if (slot < EQUIPMENT_SIZE)
{
player_node->mEquipment->setEquipment(slot, id);
}
else if (slot >= 32 && slot < 32 + INVENTORY_SIZE)
{
- int amount = id ? msg.readByte() : 0;
+ int amount = id ? msg.readInt8() : 0;
player_node->setInvItem(slot - 32, id, amount);
}
};