Network game, dedicated server without auth backend and dedicated server with auth backend should work now. Guest login still broken.

This commit is contained in:
lotodore
2009-11-14 15:04:31 +00:00
parent f258786b62
commit d727a7fd5d
7 changed files with 89 additions and 13 deletions
+22
View File
@@ -356,6 +356,15 @@ ClientThread::SelectServer(unsigned serverId)
m_selectedServerId = serverId;
}
void
ClientThread::SetLogin(const std::string &userName, const std::string &password, bool isGuest)
{
boost::mutex::scoped_lock lock(m_loginDataMutex);
m_loginData.userName = userName;
m_loginData.password = password;
m_loginData.isGuest = isGuest;
}
ServerInfo
ClientThread::GetServerInfo(unsigned serverId) const
{
@@ -1174,6 +1183,19 @@ ClientThread::UseServer(unsigned serverId)
context.SetAvatarServerAddr(useInfo.avatarServerAddr);
}
bool
ClientThread::GetLoginData(LoginData &loginData) const
{
bool retVal = false;
boost::mutex::scoped_lock lock(m_loginDataMutex);
if (!m_loginData.userName.empty())
{
loginData = m_loginData;
retVal = true;
}
return retVal;
}
unsigned
ClientThread::GetGameIdByName(const std::string &name) const
{