summaryrefslogtreecommitdiff
path: root/src/net/ea/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-05 20:58:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-05 20:58:21 +0300
commita87db81b6b7551a248e31e2850577aefda092538 (patch)
treef47c20512183113face758cf58ec71369c82806c /src/net/ea/tradehandler.cpp
parent92c019dad798f1a84c5d3e8e8331a885f6458133 (diff)
downloadplus-a87db81b6b7551a248e31e2850577aefda092538.tar.gz
plus-a87db81b6b7551a248e31e2850577aefda092538.tar.bz2
plus-a87db81b6b7551a248e31e2850577aefda092538.tar.xz
plus-a87db81b6b7551a248e31e2850577aefda092538.zip
Replace most bools usage in playerinfo to strong typed bools.
Diffstat (limited to 'src/net/ea/tradehandler.cpp')
-rw-r--r--src/net/ea/tradehandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 5bdf42775..9c6f8f387 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -103,7 +103,7 @@ void TradeHandler::processTradeResponseContinue(const uint8_t type)
tradeWindow->setVisible(false);
// tradeWindow->clear();
}
- PlayerInfo::setTrading(false);
+ PlayerInfo::setTrading(Trading_false);
break;
case 5:
NotifyManager::notify(NotifyTypes::TRADE_CANCELLED_BUSY,
@@ -135,7 +135,7 @@ void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
tradeWindow->setVisible(false);
tradeWindow->reset();
}
- PlayerInfo::setTrading(false);
+ PlayerInfo::setTrading(Trading_false);
}
void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
@@ -146,7 +146,7 @@ void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
tradeWindow->setVisible(false);
tradeWindow->reset();
}
- PlayerInfo::setTrading(false);
+ PlayerInfo::setTrading(Trading_false);
}
void TradeHandler::processTradeRequestContinue(const std::string &partner)
@@ -154,14 +154,14 @@ void TradeHandler::processTradeRequestContinue(const std::string &partner)
if (player_relations.hasPermission(partner,
PlayerRelation::TRADE))
{
- if (PlayerInfo::isTrading() || confirmDlg)
+ if (PlayerInfo::isTrading() == Trading_true || confirmDlg)
{
tradeHandler->respond(false);
return;
}
tradePartnerName = partner;
- PlayerInfo::setTrading(true);
+ PlayerInfo::setTrading(Trading_true);
if (tradeWindow)
{
if (tradePartnerName.empty() || tradeWindow->getAutoTradeNick()