From e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sat, 17 Sep 2005 13:51:37 +0000 Subject: Completed transition to use MessageOut. --- src/gui/sell.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/gui/sell.cpp') 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; -- cgit v1.2.3-70-g09d2