saving real data incl ip now

This commit is contained in:
Kai Philipp
2019-09-11 20:13:43 +02:00
parent 7cda99e881
commit ff4c2c5302
7 changed files with 14 additions and 13 deletions
+3 -4
View File
@@ -463,10 +463,9 @@ ServerGame::StoreLastGames(const PlayerDataList &playerDataList)
tmpPlayer->AddPlayerLastGame((long)time(NULL));
LOG_ERROR("TimeStamp stored: " << tmpPlayer->GetPlayerLastGames().back());
std::vector<long> lastGames = tmpPlayer->GetPlayerLastGames();
LOG_ERROR("Ready for storing vector for player " << tmpPlayer->GetUniqueId() << " - lastGameTs " << lastGames.back());
if(tmpPlayer->GetUniqueId() != DB_ID_INVALID){
LOG_ERROR("ID != DB_ID_INVALID ... calling SetPlayerLastGames()...");
GetDatabase().SetPlayerLastGames(GetId(), tmpPlayer->GetDBId(), lastGames);
LOG_ERROR("Ready for storing vector for player " << tmpPlayer->GetDBId() << " - lastGameTs " << lastGames.back());
if(tmpPlayer->GetDBId() != DB_ID_INVALID){
GetDatabase().SetPlayerLastGames(GetId(), tmpPlayer->GetDBId(), lastGames, GetSessionManager().GetSessionByUniquePlayerId(tmpPlayer->GetUniqueId())->GetClientAddr());
}
++i;
}