summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/tradehandler.cpp11
-rw-r--r--src/net/ea/tradehandler.h2
2 files changed, 7 insertions, 6 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;
}
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index 7253f4e0a..b7be2704e 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -37,7 +37,7 @@ class TradeHandler : public Net::TradeHandler
A_DELETE_COPY(TradeHandler)
- void removeItem(int slotNum, int amount);
+ void removeItem(const int slotNum, const int amount) const override;
void processTradeRequest(Net::MessageIn &msg);