diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-05 10:14:17 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-05 10:14:17 +0000 |
commit | c887f550b55b6160f074cb3160a4442ca659fad9 (patch) | |
tree | 43cd78f7bdbf00e0764792a2dbd49e7b115ac971 /src/net/gameserver | |
parent | e880b17081962580afea1d003600afffe062d427 (diff) | |
download | mana-client-c887f550b55b6160f074cb3160a4442ca659fad9.tar.gz mana-client-c887f550b55b6160f074cb3160a4442ca659fad9.tar.bz2 mana-client-c887f550b55b6160f074cb3160a4442ca659fad9.tar.xz mana-client-c887f550b55b6160f074cb3160a4442ca659fad9.zip |
Implemented item dropping.
Diffstat (limited to 'src/net/gameserver')
-rw-r--r-- | src/net/gameserver/player.cpp | 8 | ||||
-rw-r--r-- | src/net/gameserver/player.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp index 763f3d28..033327c9 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -52,6 +52,14 @@ void Net::GameServer::Player::pickUp(int x, int y) Net::GameServer::connection->send(msg); } +void Net::GameServer::Player::drop(int slot, int amount) +{ + MessageOut msg(PGMSG_DROP); + msg.writeByte(slot); + msg.writeByte(amount); + Net::GameServer::connection->send(msg); +} + void Net::GameServer::Player::equip(int slot) { MessageOut msg(PGMSG_EQUIP); diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h index a5429e65..73a533d5 100644 --- a/src/net/gameserver/player.h +++ b/src/net/gameserver/player.h @@ -35,6 +35,7 @@ namespace Net void say(const std::string &text); void walk(int x, int y); void pickUp(int x, int y); + void drop(int slot, int amount); void equip(int slot); void attack(unsigned char direction); } |