Adding country information of player (optional).

This commit is contained in:
lotodore
2010-04-01 16:20:57 +00:00
parent 2c8f8d4869
commit 2dc3ab64ec
6 changed files with 62 additions and 10 deletions
+5 -5
View File
@@ -113,9 +113,9 @@ public:
LOG_ERROR("DB query error: " << error);
}
virtual void PlayerLoginSuccess(unsigned requestId, DB_id dbPlayerId, const std::string &secret)
virtual void PlayerLoginSuccess(unsigned requestId, const DBPlayerData &dbPlayerData)
{
m_server.UserValid(requestId, dbPlayerId, secret);
m_server.UserValid(requestId, dbPlayerData);
}
virtual void PlayerLoginFailed(unsigned requestId)
@@ -1483,11 +1483,11 @@ ServerLobbyThread::AuthenticatePlayer(SessionWrapper session)
}
void
ServerLobbyThread::UserValid(unsigned playerId, DB_id dbPlayerId, const string &dbSecret)
ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData)
{
SessionWrapper tmpSession = m_sessionManager.GetSessionByUniquePlayerId(playerId, true);
tmpSession.playerData->SetDBId(dbPlayerId);
this->AuthChallenge(tmpSession, dbSecret);
tmpSession.playerData->SetDBId(dbPlayerData.id);
this->AuthChallenge(tmpSession, dbPlayerData.secret);
}
void
+1 -1
View File
@@ -145,7 +145,7 @@ protected:
void InitAfterLogin(SessionWrapper session);
void EstablishSession(SessionWrapper session);
void AuthenticatePlayer(SessionWrapper session);
void UserValid(unsigned playerId, DB_id dbPlayerId, const std::string &dbSecret);
void UserValid(unsigned playerId, const DBPlayerData &dbPlayerData);
void UserInvalid(unsigned playerId);
void RequestPlayerAvatar(SessionWrapper session);
void TimerRemoveGame(const boost::system::error_code &ec);