diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-04 22:28:08 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-04 22:28:08 +0000 |
commit | 90290b7aaf2a55187598e67c31d33f5735f574ce (patch) | |
tree | 64826ee1d40e993ab70c9d6f077ded33c747edf0 /src/net/gameserver/player.cpp | |
parent | 4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac (diff) | |
download | mana-client-90290b7aaf2a55187598e67c31d33f5735f574ce.tar.gz mana-client-90290b7aaf2a55187598e67c31d33f5735f574ce.tar.bz2 mana-client-90290b7aaf2a55187598e67c31d33f5735f574ce.tar.xz mana-client-90290b7aaf2a55187598e67c31d33f5735f574ce.zip |
Client-side hack for picking up items.
Diffstat (limited to 'src/net/gameserver/player.cpp')
-rw-r--r-- | src/net/gameserver/player.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp index 0a47a6bc..763f3d28 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -32,38 +32,30 @@ void Net::GameServer::Player::say(const std::string &text) { MessageOut msg(PGMSG_SAY); - msg.writeString(text); - Net::GameServer::connection->send(msg); } -void Net::GameServer::Player::walk(short x, short y) +void Net::GameServer::Player::walk(int x, int y) { MessageOut msg(PGMSG_WALK); - msg.writeShort(x); msg.writeShort(y); - Net::GameServer::connection->send(msg); } -void Net::GameServer::Player::useItem(int itemId) +void Net::GameServer::Player::pickUp(int x, int y) { - MessageOut msg(PGMSG_USE_ITEM); - - msg.writeLong(itemId); - + MessageOut msg(PGMSG_PICKUP); + msg.writeShort(x); + msg.writeShort(y); Net::GameServer::connection->send(msg); } -void Net::GameServer::Player::equip(int itemId, char slot) +void Net::GameServer::Player::equip(int slot) { MessageOut msg(PGMSG_EQUIP); - - msg.writeLong(itemId); msg.writeByte(slot); - Net::GameServer::connection->send(msg); } |