diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-09-17 13:51:37 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-09-17 13:51:37 +0000 |
commit | e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c (patch) | |
tree | 8feb8b51d731057412a59aeddbbe83b75b09912a /src/gui/sell.cpp | |
parent | 3bfcee0d9c033a46fe1b13795d89909c8fb6a239 (diff) | |
download | mana-client-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.gz mana-client-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.bz2 mana-client-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.xz mana-client-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.zip |
Completed transition to use MessageOut.
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r-- | src/gui/sell.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index 7c030eb1..c3596503 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -40,7 +40,9 @@ #include "../resources/iteminfo.h" #include "../resources/itemmanager.h" +#include "../net/messageout.h" #include "../net/network.h" +#include "../net/protocol.h" SellDialog::SellDialog(): @@ -229,11 +231,12 @@ void SellDialog::action(const std::string& eventId) else if (eventId == "sell") { // Attempt sell assert(m_amountItems > 0 && m_amountItems <= m_maxItems); - - writeWord(0, 0x00c9); - writeWord(2, 8); - writeWord(4, shopInventory[selectedItem].index); - writeWord(6, m_amountItems); + + MessageOut outMsg; + outMsg.writeShort(CMSG_NPC_SELL_REQUEST); + outMsg.writeShort(8); + outMsg.writeShort(shopInventory[selectedItem].index); + outMsg.writeShort(m_amountItems); writeSet(8); m_maxItems -= m_amountItems; |