예제 #1
0
void CUILobbyMP::WriteLeaderBoard()
{

	ICryLobby *Lobby = gEnv->pNetwork->GetLobby();
	CGameLobby* pGameLobby = g_pGame->GetGameLobby();
	ICryLobbyService *Service = (Lobby) ? Lobby->GetLobbyService() : NULL;
	ICryStats *Stats = (Service != NULL) ? Service->GetStats() : NULL;


	unsigned int user = g_pGame->GetPlayerProfileManager()->GetExclusiveControllerDeviceIndex();
	CryUserID userID = Service->GetUserID(user);
	ECryLobbyError Error;
	
	SCryStatsLeaderBoardWrite leaderboard;
	leaderboard.id = 0;
	leaderboard.data.numColumns = 0;
	leaderboard.data.pColumns = NULL;
	leaderboard.data.score.score = 311;
	leaderboard.data.score.id = 0;










	Error = Stats->StatsWriteLeaderBoards(pGameLobby->GetCurrentSessionHandle(), user, &leaderboard, 1, NULL, CUILobbyMP::WriteLeaderboardCallback, this);

}
//-------------------------------------------------------------------------
CrySessionHandle CCryLobbySessionHandler::GetGameSessionHandle() const
{
	CrySessionHandle result = CrySessionInvalidHandle;

	CGameLobby* pGameLobby = g_pGame->GetGameLobby();
	if (pGameLobby)
	{
		result = pGameLobby->GetCurrentSessionHandle();
	}

	return result;
}