debugging
This commit is contained in:
@@ -349,8 +349,8 @@ ServerGame::InternalStartGame()
|
|||||||
InitRankingMap(playerData);
|
InitRankingMap(playerData);
|
||||||
|
|
||||||
// @TODO: here to save lastGames with mysql per player
|
// @TODO: here to save lastGames with mysql per player
|
||||||
|
|
||||||
//if (GetGameData().gameType == GAME_TYPE_RANKING)
|
//if (GetGameData().gameType == GAME_TYPE_RANKING)
|
||||||
LOG_ERROR("before StoreLastGames().");
|
|
||||||
if(true)
|
if(true)
|
||||||
StoreLastGames();
|
StoreLastGames();
|
||||||
}
|
}
|
||||||
@@ -457,16 +457,14 @@ ServerGame::StoreLastGames()
|
|||||||
|
|
||||||
RankingMap::const_iterator i = m_rankingMap.begin();
|
RankingMap::const_iterator i = m_rankingMap.begin();
|
||||||
RankingMap::const_iterator end = m_rankingMap.end();
|
RankingMap::const_iterator end = m_rankingMap.end();
|
||||||
LOG_ERROR("StoreLastGames() entered.");
|
|
||||||
while (i != end) {
|
while (i != end) {
|
||||||
LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid);
|
LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid);
|
||||||
boost::shared_ptr<SessionData> tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid);
|
boost::shared_ptr<SessionData> tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid);
|
||||||
if(tmpSession){
|
if(tmpSession){
|
||||||
|
tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL));
|
||||||
|
LOG_ERROR("TimeStamp stored: " << tmpSession->GetPlayerData()->GetPlayerLastGames().back());
|
||||||
std::vector<long> lastGames = tmpSession->GetPlayerData()->GetPlayerLastGames();
|
std::vector<long> lastGames = tmpSession->GetPlayerData()->GetPlayerLastGames();
|
||||||
|
LOG_ERROR("Ready for storing vector: " << lastGames.back());
|
||||||
//if(lastGames.size() > 0)
|
|
||||||
//GetLobbyThread().GetDatabase().SetGamePlayerPlace(GetId(), (*i).second.dbid, lastGames);
|
|
||||||
LOG_ERROR("last timeStamp" << lastGames.back() << ".");
|
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1438,9 +1438,6 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr<SessionData> sessio
|
|||||||
// ){
|
// ){
|
||||||
// SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED);
|
// SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED);
|
||||||
} else {
|
} else {
|
||||||
// @FIXME: debug only - final position is gamestart
|
|
||||||
session->GetPlayerData()->AddPlayerLastGame((long)time(NULL));
|
|
||||||
LOG_ERROR("TimeStamp stored: " << session->GetPlayerData()->GetPlayerLastGames().back());
|
|
||||||
MoveSessionToGame(game, session, joinGame.autoleave(), false);
|
MoveSessionToGame(game, session, joinGame.autoleave(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user