bugfix
This commit is contained in:
+3
-3
@@ -271,7 +271,7 @@ PlayerData::GetPlayerLastGames()
|
||||
}
|
||||
|
||||
bool
|
||||
PlayerData::IsPlayerAllowedToJoinCreateLimitRank(int num, int period)
|
||||
PlayerData::IsPlayerAllowedToJoinCreateLimitRank(string num, string period)
|
||||
{
|
||||
bool retVal = false;
|
||||
LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
|
||||
@@ -280,7 +280,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
|
||||
|
||||
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 i=0;
|
||||
@@ -298,7 +298,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
|
||||
i++;
|
||||
}
|
||||
|
||||
if(count < num)
|
||||
if(count < stoi(num))
|
||||
retVal = true;
|
||||
|
||||
return retVal;
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ public:
|
||||
void AddPlayerLastGame(long last_games);
|
||||
void SetPlayerLastGames(std::vector<long> last_games);
|
||||
std::vector<long> GetPlayerLastGames();
|
||||
bool IsPlayerAllowedToJoinCreateLimitRank(int num, int period);
|
||||
bool IsPlayerAllowedToJoinCreateLimitRank(string num, string period);
|
||||
|
||||
bool operator<(const PlayerData &other) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user