Player list is now sent in Game List New notification. Not shown in dialog yet.

This commit is contained in:
lotodore
2007-09-01 22:59:55 +00:00
parent 096c02dd24
commit d35f4ae997
7 changed files with 75 additions and 3 deletions
+21
View File
@@ -219,6 +219,27 @@ SessionManager::GetPlayerDataList() const
return playerList;
}
PlayerIdList
SessionManager::GetPlayerIdList() const
{
PlayerIdList playerList;
boost::mutex::scoped_lock lock(m_sessionMapMutex);
SessionMap::const_iterator session_i = m_sessionMap.begin();
SessionMap::const_iterator session_end = m_sessionMap.end();
while (session_i != session_end)
{
// Get all players in the game.
if (session_i->second.sessionData->GetState() == SessionData::Game)
{
playerList.push_back(session_i->second.playerData->GetUniqueId());
}
++session_i;
}
return playerList;
}
bool
SessionManager::IsPlayerConnected(const string &playerName) const
{