summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index ea5b948f..f89055b4 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -34,8 +34,8 @@
#include "shop.h"
#include "slider.h"
-#include "../game.h"
#include "../item.h"
+#include "../npc.h"
#include "../resources/iteminfo.h"
#include "../resources/itemmanager.h"
@@ -44,8 +44,9 @@
#include "../net/protocol.h"
-SellDialog::SellDialog():
+SellDialog::SellDialog(Network *network):
Window("Sell"),
+ mNetwork(network),
m_maxItems(0), m_amountItems(0)
{
itemList = new ListBox(this);
@@ -216,7 +217,7 @@ void SellDialog::action(const std::string& eventId)
// Attempt sell
assert(m_amountItems > 0 && m_amountItems <= m_maxItems);
- MessageOut outMsg;
+ MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_NPC_SELL_REQUEST);
outMsg.writeInt16(8);
outMsg.writeInt16(shopInventory[selectedItem].index);