From 86bc8bd8772953083028a8c739d2adeb6a24309e Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 14 May 2019 01:04:20 +0800 Subject: [PATCH] Add country code info to submit ranking --- src/network/protocols/server_lobby.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index bf04df2c3..8ab1463e8 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -3661,13 +3661,15 @@ void ServerLobby::submitRankingsToAddons() { public: SumbitRankingRequest(uint32_t online_id, double scores, - double max_scores, unsigned num_races) + double max_scores, unsigned num_races, + const std::string& country_code) : XMLRequest(true) { addParameter("id", online_id); addParameter("scores", scores); addParameter("max-scores", max_scores); addParameter("num-races-done", num_races); + addParameter("country-code", country_code); } virtual void afterOperation() { @@ -3688,7 +3690,8 @@ void ServerLobby::submitRankingsToAddons() const uint32_t id = race_manager->getKartInfo(i).getOnlineId(); SumbitRankingRequest* request = new SumbitRankingRequest (id, m_scores.at(id), m_max_scores.at(id), - m_num_ranked_races.at(id)); + m_num_ranked_races.at(id), + race_manager->getKartInfo(i).getCountryCode()); NetworkConfig::get()->setUserDetails(request, "submit-ranking"); Log::info("ServerLobby", "Submiting ranking for %s (%d) : %lf, %lf %d", StringUtils::wideToUtf8(