diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-14 12:10:41 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-14 12:10:41 +0000 |
commit | f048a4dd4add4a710bb15f77eaedad93f625b0c4 (patch) | |
tree | 46849986ed36a23f9a386b0475eb8e7c4a4f3f68 /src/net | |
parent | b9772c8575708a9f28d89b3b973af73e382e9329 (diff) | |
download | mana-client-f048a4dd4add4a710bb15f77eaedad93f625b0c4.tar.gz mana-client-f048a4dd4add4a710bb15f77eaedad93f625b0c4.tar.bz2 mana-client-f048a4dd4add4a710bb15f77eaedad93f625b0c4.tar.xz mana-client-f048a4dd4add4a710bb15f77eaedad93f625b0c4.zip |
Enabled buying and selling from NPCs.
Diffstat (limited to 'src/net')
-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 29d711d7..feba5565 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -139,3 +139,11 @@ void Net::GameServer::Player::tradeItem(int slot, int amount) msg.writeByte(amount); Net::GameServer::connection->send(msg); } + +void Net::GameServer::Player::tradeWithNPC(int item, int amount) +{ + MessageOut msg(PGMSG_NPC_BUYSELL); + msg.writeShort(item); + msg.writeShort(amount); + Net::GameServer::connection->send(msg); +} diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h index d21e656e..dcf3f267 100644 --- a/src/net/gameserver/player.h +++ b/src/net/gameserver/player.h @@ -49,6 +49,7 @@ namespace Net void requestTrade(int id); void acceptTrade(bool accept); void tradeItem(int slot, int amount); + void tradeWithNPC(int item, int amount); } } } |