summaryrefslogtreecommitdiff
path: root/src/net/ea/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-19 17:55:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-19 17:55:52 +0300
commitfa378412565f98a1ce6d438425ca34b20aaf223a (patch)
tree34bf055f2b179b9d49cbe5cabd646173737a053a /src/net/ea/tradehandler.cpp
parent2ef04505f91aa7bb1629ac294e9f166280961510 (diff)
downloadplus-fa378412565f98a1ce6d438425ca34b20aaf223a.tar.gz
plus-fa378412565f98a1ce6d438425ca34b20aaf223a.tar.bz2
plus-fa378412565f98a1ce6d438425ca34b20aaf223a.tar.xz
plus-fa378412565f98a1ce6d438425ca34b20aaf223a.zip
Add static in tradehandler.
Diffstat (limited to 'src/net/ea/tradehandler.cpp')
-rw-r--r--src/net/ea/tradehandler.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 41e8be6d7..1b0067f7c 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -64,20 +64,20 @@ void TradeHandler::removeItem(const int slotNum A_UNUSED,
{
}
-void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
+void TradeHandler::processTradeResponse(Net::MessageIn &msg)
{
if (confirmDlg || tradePartnerName.empty()
|| !player_relations.hasPermission(tradePartnerName,
PlayerRelation::TRADE))
{
- respond(false);
+ tradeHandler->respond(false);
return;
}
const uint8_t type = msg.readUInt8("type");
processTradeResponseContinue(type);
}
-void TradeHandler::processTradeResponseContinue(const uint8_t type) const
+void TradeHandler::processTradeResponseContinue(const uint8_t type)
{
switch (type)
{
@@ -164,14 +164,13 @@ void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
}
void TradeHandler::processTradeRequestContinue(const std::string &partner)
- const
{
if (player_relations.hasPermission(partner,
PlayerRelation::TRADE))
{
if (PlayerInfo::isTrading() || confirmDlg)
{
- respond(false);
+ tradeHandler->respond(false);
return;
}
@@ -194,13 +193,13 @@ void TradeHandler::processTradeRequestContinue(const std::string &partner)
}
else
{
- respond(true);
+ tradeHandler->respond(true);
}
}
}
else
{
- respond(false);
+ tradeHandler->respond(false);
return;
}
}