lastGames restored after login
This commit is contained in:
1 parent
f35ce20ff9
commit
06f9fb7fff
3 files changed
+12
-2
No files matched your search
@@ -1811,6 +1811,16 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
|
||||
if (tmpSession && tmpSession->GetPlayerData()) {
|
||||
tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id);
|
||||
tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country);
|
||||
LOG_ERROR("lastGames from db = " << dbPlayerData.lastGames);
|
||||
std::vector<int> lastGames;
|
||||
std::stringstream ss(dbPlayerData.lastGames);
|
||||
for (int i; ss >> i;) {
|
||||
lastGames.push_back(i);
|
||||
if (ss.peek() == ',')
|
||||
ss.ignore();
|
||||
}
|
||||
tmpSession->GetPlayerData()->SetPlayerLastGames(lastGames);
|
||||
LOG_ERROR("lastGames first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames());
|
||||
this->AuthChallenge(tmpSession, dbPlayerData.secret);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user