Merge pull request #431 from kamyker/leaderboards-count

DownloadLeaderboardEntries count more precise
This commit is contained in:
Garry Newman 2020-05-18 11:18:50 +01:00 committed by GitHub
commit d080548c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ public async Task<LeaderboardEntry[]> GetScoresAsync( int count, int offset = 1
{ {
if ( offset <= 0 ) throw new System.ArgumentException( "Should be 1+", nameof( offset ) ); if ( offset <= 0 ) throw new System.ArgumentException( "Should be 1+", nameof( offset ) );
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count ); var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count - 1 );
if ( !r.HasValue ) if ( !r.HasValue )
return null; return null;