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.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp
index daf76c3e..c91923d8 100644
--- a/src/net/gameserver/player.cpp
+++ b/src/net/gameserver/player.cpp
@@ -95,3 +95,25 @@ void Net::GameServer::Player::selectFromNPC(int id, int choice)
msg.writeByte(choice);
Net::GameServer::connection->send(msg);
}
+
+void Net::GameServer::Player::requestTrade(int id)
+{
+ MessageOut msg(PGMSG_TRADE_REQUEST);
+ msg.writeShort(id);
+ Net::GameServer::connection->send(msg);
+}
+
+void Net::GameServer::Player::acceptTrade(bool accept)
+{
+ MessageOut msg(accept ? PGMSG_TRADE_ACCEPT : PGMSG_TRADE_CANCEL);
+ Net::GameServer::connection->send(msg);
+}
+
+void Net::GameServer::Player::tradeItem(int slot, int amount)
+{
+ MessageOut msg(PGMSG_TRADE_ADD_ITEM);
+ msg.writeByte(slot);
+ msg.writeByte(amount);
+ Net::GameServer::connection->send(msg);
+}
+