This commit is contained in:
Kai Philipp
2019-09-15 17:36:03 +02:00
parent fb9a1a8781
commit d707d3d653
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -271,7 +271,7 @@ PlayerData::GetPlayerLastGames()
} }
bool bool
PlayerData::IsPlayerAllowedToJoinCreateLimitRank(int num, int period) PlayerData::IsPlayerAllowedToJoinCreateLimitRank(string num, string period)
{ {
bool retVal = false; bool retVal = false;
LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() "); LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
@@ -280,7 +280,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
boost::mutex::scoped_lock lock(m_dataMutex); boost::mutex::scoped_lock lock(m_dataMutex);
long then = (long)time(NULL) - (long)(period * 10); long then = (long)time(NULL) - (long)(stoi(period) * 10);
int count = 0; int count = 0;
int i=0; int i=0;
@@ -298,7 +298,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
i++; i++;
} }
if(count < num) if(count < stoi(num))
retVal = true; retVal = true;
return retVal; return retVal;
+1 -1
View File
@@ -120,7 +120,7 @@ public:
void AddPlayerLastGame(long last_games); void AddPlayerLastGame(long last_games);
void SetPlayerLastGames(std::vector<long> last_games); void SetPlayerLastGames(std::vector<long> last_games);
std::vector<long> GetPlayerLastGames(); std::vector<long> GetPlayerLastGames();
bool IsPlayerAllowedToJoinCreateLimitRank(int num, int period); bool IsPlayerAllowedToJoinCreateLimitRank(string num, string period);
bool operator<(const PlayerData &other) const; bool operator<(const PlayerData &other) const;