PlayerIdList StoreLastGames

This commit is contained in:
Kai Philipp
2019-09-10 21:15:38 +02:00
parent 1eb486660e
commit 9d31fc3b5e
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -452,8 +452,11 @@ void
ServerGame::StoreLastGames()
{
// Store players lastgames in database.
RankingMap::const_iterator i = m_rankingMap.begin();
RankingMap::const_iterator end = m_rankingMap.end();
PlayerIdList plist = GetPlayerIdList();
RankingMap::const_iterator i = plist.info.players.begin();
RankingMap::const_iterator end = plist.info.players.end();
while (i != end) {
boost::shared_ptr<SessionData> tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid);
@@ -462,7 +465,7 @@ ServerGame::StoreLastGames()
if(tmpSession){
std::vector<long> lastGames = tmpSession->GetPlayerData()->GetPlayerLastGames();
if(lastGames.size() > 0)
//if(lastGames.size() > 0)
//GetLobbyThread().GetDatabase().SetGamePlayerPlace(GetId(), (*i).second.dbid, lastGames);
LOG_VERBOSE("last timeStamp" << *lastGames.end() << ".");
}