summaryrefslogtreecommitdiff
path: root/src/net/ea/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-11 01:09:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-11 01:09:29 +0300
commit9ce9d5563195bf9d7d22356252f38bc95b247527 (patch)
tree984014cbb799fefaa62d3e8f8c7820ed2b6407c1 /src/net/ea/tradehandler.cpp
parentfc199c3ae60d4c4cf76236c7f4891113daa3cbc4 (diff)
downloadplus-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.gz
plus-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.bz2
plus-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.xz
plus-9ce9d5563195bf9d7d22356252f38bc95b247527.zip
imporve tradehandler class.
Diffstat (limited to 'src/net/ea/tradehandler.cpp')
-rw-r--r--src/net/ea/tradehandler.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 961f8ff62..b4aca1041 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -67,7 +67,8 @@ TradeHandler::TradeHandler()
confirmDlg = nullptr;
}
-void TradeHandler::removeItem(int slotNum A_UNUSED, int amount A_UNUSED)
+void TradeHandler::removeItem(const int slotNum A_UNUSED,
+ const int amount A_UNUSED) const
{
// TODO
}
@@ -87,7 +88,7 @@ void TradeHandler::processTradeRequest(Net::MessageIn &msg)
{
if (PlayerInfo::isTrading() || confirmDlg)
{
- Net::getTradeHandler()->respond(false);
+ respond(false);
return;
}
@@ -106,13 +107,13 @@ void TradeHandler::processTradeRequest(Net::MessageIn &msg)
}
else
{
- Net::getTradeHandler()->respond(true);
+ respond(true);
}
}
}
else
{
- Net::getTradeHandler()->respond(false);
+ respond(false);
return;
}
}
@@ -123,7 +124,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg)
|| !player_relations.hasPermission(tradePartnerName,
PlayerRelation::TRADE))
{
- Net::getTradeHandler()->respond(false);
+ respond(false);
return;
}