This commit is contained in:
Kai Philipp
2019-09-13 18:28:42 +02:00
parent fdc37cfb65
commit 36389ba750
+8 -8
View File
@@ -1812,14 +1812,14 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id);
tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country);
LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
std::vector<long> last_games;
std::stringstream ss(dbPlayerData.last_games);
for (string i; ss >> i;) {
last_games.push_back(stol(i));
if (ss.peek() == ',')
ss.ignore();
}
tmpSession->GetPlayerData()->SetPlayerLastGames(last_games);
// std::vector<long> last_games;
// std::stringstream ss(dbPlayerData.last_games);
// for (string i; ss >> i;) {
// last_games.push_back(stol(i));
// if (ss.peek() == ',')
// ss.ignore();
// }
// tmpSession->GetPlayerData()->SetPlayerLastGames(last_games);
//LOG_ERROR("last_games first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().front());
this->AuthChallenge(tmpSession, dbPlayerData.secret);
}