summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
commitbd56bf8afdab16383ed8ad08412a8c807f84af85 (patch)
tree0e963ada63bcbe3c50dd77986aaa15b9ba49816a /src/gui/buy.cpp
parent5359640b6f271af31f6423df9d661433eff89a3e (diff)
downloadmana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.gz
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.bz2
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.xz
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.zip
Merged NETWORK branch (includes BEING_OVERHAUL).
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 1c0b2ea7..65f2e525 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -33,7 +33,7 @@
#include "shop.h"
#include "slider.h"
-#include "../game.h"
+#include "../npc.h"
#include "../resources/iteminfo.h"
#include "../resources/itemmanager.h"
@@ -42,8 +42,8 @@
#include "../net/protocol.h"
-BuyDialog::BuyDialog():
- Window("Buy"),
+BuyDialog::BuyDialog(Network *network):
+ Window("Buy"), mNetwork(network),
m_money(0), m_amountItems(0), m_maxItems(0)
{
itemList = new ListBox(this);
@@ -221,7 +221,7 @@ void BuyDialog::action(const std::string& eventId)
// there a better way to ensure this fails in an _obivous_ way in C++?
else if (eventId == "buy" && (m_amountItems > 0 &&
m_amountItems <= m_maxItems)) {
- MessageOut outMsg;
+ MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_NPC_BUY_REQUEST);
outMsg.writeInt16(8);
outMsg.writeInt16(m_amountItems);