summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-17 11:59:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-17 11:59:03 +0300
commit3aaebb5b7f1faf46d9f437ba00e7650147453952 (patch)
treefa5f0949dd16db6b30b0132a02f33d3fe784acb0 /src/gui/windows
parentc81a850333f6e651e0dddb764e98a0fae45ca5f4 (diff)
downloadmanaverse-3aaebb5b7f1faf46d9f437ba00e7650147453952.tar.gz
manaverse-3aaebb5b7f1faf46d9f437ba00e7650147453952.tar.bz2
manaverse-3aaebb5b7f1faf46d9f437ba00e7650147453952.tar.xz
manaverse-3aaebb5b7f1faf46d9f437ba00e7650147453952.zip
Remove getter for tradeHandler.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/shopwindow.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index e846e0dce..a78a8fbcd 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -310,7 +310,7 @@ void ShopWindow::startTrade()
tradeWindow->addAutoItem(mTradeNick, mTradeItem,
mTradeItem->getQuantity());
}
- Net::getTradeHandler()->request(being);
+ tradeHandler->request(being);
tradePartnerName = mTradeNick;
mTradeNick.clear();
}
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 7707bf360..7f6e78a9b 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -273,7 +273,7 @@ void TradeWindow::tradeItem(const Item *const item, const int quantity,
if (check && !checkItem(item))
return;
- Net::getTradeHandler()->addItem(item, quantity);
+ tradeHandler->addItem(item, quantity);
}
void TradeWindow::valueChanged(const SelectionEvent &event)
@@ -365,7 +365,7 @@ void TradeWindow::action(const ActionEvent &event)
setVisible(false);
reset();
PlayerInfo::setTrading(false);
- Net::getTradeHandler()->cancel();
+ tradeHandler->cancel();
}
else if (eventId == "ok")
{
@@ -374,13 +374,13 @@ void TradeWindow::action(const ActionEvent &event)
mMoneyChangeButton->setEnabled(false);
receivedOk(true);
setStatus(PROPOSING);
- Net::getTradeHandler()->confirm();
+ tradeHandler->confirm();
}
else if (eventId == "trade")
{
receivedOk(true);
setStatus(ACCEPTED);
- Net::getTradeHandler()->finish();
+ tradeHandler->finish();
}
else if (eventId == "money")
{
@@ -399,14 +399,14 @@ void TradeWindow::action(const ActionEvent &event)
}
v = curMoney;
}
- Net::getTradeHandler()->setMoney(v);
+ tradeHandler->setMoney(v);
mMoneyField->setText(strprintf("%d", v));
}
}
void TradeWindow::close()
{
- Net::getTradeHandler()->cancel();
+ tradeHandler->cancel();
clear();
}
@@ -457,7 +457,7 @@ void TradeWindow::initTrade(const std::string &nick)
}
if (mAutoMoney)
{
- Net::getTradeHandler()->setMoney(mAutoMoney);
+ tradeHandler->setMoney(mAutoMoney);
mMoneyField->setText(strprintf("%d", mAutoMoney));
}
}