summaryrefslogtreecommitdiff
path: root/src/net/itemhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 14:57:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 14:57:35 +0000
commitde61b658590630cfc59960c012c8e533b361a8b0 (patch)
treeb89a6f23a385ea4a7d32e3abc6ce4a82114c5d67 /src/net/itemhandler.cpp
parentdbca3013575b766a681d1cea946e249a386e2144 (diff)
parent482f0ddb85487bd5a4beaf2706cca9f690aa9304 (diff)
downloadmana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.gz
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.bz2
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.xz
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.zip
Moved 0.1.0 branch to trunk. A new beginning.
Diffstat (limited to 'src/net/itemhandler.cpp')
-rw-r--r--src/net/itemhandler.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/net/itemhandler.cpp b/src/net/itemhandler.cpp
index 567a5382..2961f71b 100644
--- a/src/net/itemhandler.cpp
+++ b/src/net/itemhandler.cpp
@@ -40,29 +40,28 @@ ItemHandler::ItemHandler()
handledMessages = _messages;
}
-void ItemHandler::handleMessage(MessageIn *msg)
+void ItemHandler::handleMessage(MessageIn &msg)
{
Uint32 id;
Uint16 x, y;
Sint16 itemId;
- switch (msg->getId())
+ switch (msg.getId())
{
case SMSG_ITEM_VISIBLE:
case SMSG_ITEM_DROPPED:
- id = msg->readInt32();
- itemId = msg->readInt16();
- msg->readInt8(); // identify flag
- x = msg->readInt16();
- y = msg->readInt16();
- msg->skip(4); // amount,subX,subY / subX,subY,amount
+ id = msg.readLong();
+ itemId = msg.readShort();
+ msg.readByte(); // identify flag
+ x = msg.readShort();
+ y = msg.readShort();
floorItemManager->create(id, itemId, x, y, engine->getCurrentMap());
break;
case SMSG_ITEM_REMOVE:
FloorItem *item;
- item = floorItemManager->findById(msg->readInt32());
+ item = floorItemManager->findById(msg.readLong());
if (item)
floorItemManager->destroy(item);
break;