summaryrefslogtreecommitdiff
path: root/src/gamehandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-10-20 21:08:10 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-10-20 21:08:10 +0000
commit89683f9b2e2f788bbbb23d6874c495e54cf60a28 (patch)
tree8ff012614bce09ee9c3668938dab61bb5ca4ff0c /src/gamehandler.cpp
parentd9ba1d35c8076f86283073cd66b25e495641dcae (diff)
downloadmanaserv-89683f9b2e2f788bbbb23d6874c495e54cf60a28.tar.gz
manaserv-89683f9b2e2f788bbbb23d6874c495e54cf60a28.tar.bz2
manaserv-89683f9b2e2f788bbbb23d6874c495e54cf60a28.tar.xz
manaserv-89683f9b2e2f788bbbb23d6874c495e54cf60a28.zip
Adding inventory handling (basics) Part 1.
Diffstat (limited to 'src/gamehandler.cpp')
-rw-r--r--src/gamehandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gamehandler.cpp b/src/gamehandler.cpp
index 42cb0c70..968325a7 100644
--- a/src/gamehandler.cpp
+++ b/src/gamehandler.cpp
@@ -178,7 +178,7 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message)
// remove the item from world map
// send feedback
- computer.getCharacter()->addInventory(itemId);
+ computer.getCharacter()->addItem(itemId);
result.writeShort(GPMSG_PICKUP_RESPONSE);
result.writeByte(ERRMSG_OK);
} break;
@@ -211,11 +211,11 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message)
case PGMSG_EQUIP:
{
- int itemId = message.readLong();
+ int itemId = message.readLong(); // Not useful, the inventory knows it
char slot = message.readByte();
result.writeShort(GPMSG_EQUIP_RESPONSE);
- result.writeByte(computer.getCharacter()->equip(itemId, slot) ?
+ result.writeByte(computer.getCharacter()->equip(slot) ?
ERRMSG_OK : ERRMSG_FAILURE);
} break;