From 64e543fc16f7c565f8cc299a5a668b6477f121f9 Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Wed, 11 Sep 2019 03:54:31 +0200 Subject: [PATCH] debug --- src/net/common/servergame.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 2ed69024..232e6e6d 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -457,13 +457,14 @@ ServerGame::StoreLastGames() RankingMap::const_iterator i = m_rankingMap.begin(); RankingMap::const_iterator end = m_rankingMap.end(); - boost::shared_ptr tmpSession; + //boost::shared_ptr tmpSession; while (i != end) { LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); - tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); - if(tmpSession){ - tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); - LOG_ERROR("TimeStamp stored: " << tmpSession->GetPlayerData()->GetPlayerLastGames().back()); + //tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); + //if(tmpSession){ + if(GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid)){ + GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid)->tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); + LOG_ERROR("TimeStamp stored: " << GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid)->GetPlayerData()->GetPlayerLastGames().back()); std::vector lastGames = tmpSession->GetPlayerData()->GetPlayerLastGames(); LOG_ERROR("Ready for storing vector: " << lastGames.back()); }else{