summaryrefslogtreecommitdiff
path: root/src/net/gameserver/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/gameserver/player.cpp')
-rw-r--r--src/net/gameserver/player.cpp17
1 files changed, 16 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);
}
-