mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Merge pull request #434 from kamyker/leaderboards-users-ids
Added GetScoresForUsersAsync (DownloadLeaderboardEntriesForUsers)
This commit is contained in:
commit
d4356b75dd
@ -59,6 +59,21 @@ namespace Steamworks.Data
|
||||
return r.Value.Result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches leaderboard entries for an arbitrary set of users on a specified leaderboard.
|
||||
/// </summary>
|
||||
public async Task<LeaderboardEntry[]> GetScoresForUsersAsync( SteamId[] users )
|
||||
{
|
||||
if ( users == null || users.Length == 0 )
|
||||
return null;
|
||||
|
||||
var r = await SteamUserStats.Internal.DownloadLeaderboardEntriesForUsers( Id, users, users.Length );
|
||||
if ( !r.HasValue )
|
||||
return null;
|
||||
|
||||
return await LeaderboardResultToEntries( r.Value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to query for a sequential range of leaderboard entries by leaderboard Sort.
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user