diff options
author | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-14 05:59:52 +0000 |
---|---|---|
committer | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-14 05:59:52 +0000 |
commit | 0601642d8b3aa2c7aa365e27aa3ef2459553c3fd (patch) | |
tree | e2c4a93c3aca4b35b69857b17b722c3260b4c3d1 /src/net/gameserver | |
parent | 68f069fea3182c6d5720df03f1d63de38f14c31d (diff) | |
download | mana-client-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.gz mana-client-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.bz2 mana-client-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.xz mana-client-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.zip |
mantis_id:129 - Inventory Window Slots Added.
Diffstat (limited to 'src/net/gameserver')
-rw-r--r-- | src/net/gameserver/player.cpp | 17 | ||||
-rw-r--r-- | src/net/gameserver/player.h | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp index e93fff46..29d711d7 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -52,6 +52,15 @@ void Net::GameServer::Player::pickUp(int x, int y) Net::GameServer::connection->send(msg); } +void Net::GameServer::Player::moveItem(int oldSlot, int newSlot, int amount) +{ + MessageOut msg(PGMSG_MOVE_ITEM); + msg.writeByte(oldSlot); + msg.writeByte(newSlot); + msg.writeByte(amount); + Net::GameServer::connection->send(msg); +} + void Net::GameServer::Player::drop(int slot, int amount) { MessageOut msg(PGMSG_DROP); @@ -74,6 +83,13 @@ void Net::GameServer::Player::unequip(int slot) Net::GameServer::connection->send(msg); } +void Net::GameServer::Player::useItem(int slot) +{ + MessageOut msg(PGMSG_USE_ITEM); + msg.writeByte(slot); + Net::GameServer::connection->send(msg); +} + void Net::GameServer::Player::attack(int direction) { MessageOut msg(PGMSG_ATTACK); @@ -123,4 +139,3 @@ void Net::GameServer::Player::tradeItem(int slot, int amount) msg.writeByte(amount); Net::GameServer::connection->send(msg); } - diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h index 4c27d4d0..d21e656e 100644 --- a/src/net/gameserver/player.h +++ b/src/net/gameserver/player.h @@ -37,9 +37,11 @@ namespace Net void say(const std::string &text); void walk(int x, int y); void pickUp(int x, int y); + void moveItem(int oldSlot, int newSlot, int amount); void drop(int slot, int amount); void equip(int slot); void unequip(int slot); + void useItem(int slot); void attack(int direction); void changeAction(Being::Action action); void talkToNPC(int id, bool restart); |