mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
RequestUserStats to RequestUserStatsAsync
This commit is contained in:
parent
52ecc0b594
commit
23b3304332
@ -18,7 +18,7 @@ public class GameServerStatsTest
|
||||
[TestMethod]
|
||||
public async Task GetAchievement()
|
||||
{
|
||||
var result = await SteamServerStats.RequestUserStats( Garry );
|
||||
var result = await SteamServerStats.RequestUserStatsAsync( Garry );
|
||||
Assert.AreEqual( result, Result.OK );
|
||||
|
||||
var value = SteamServerStats.GetAchievement( Garry, "COLLECT_100_WOOD" );
|
||||
|
@ -174,7 +174,7 @@ public async Task GetFriendStats()
|
||||
var friend = new Friend( 76561197965732579 ); // Hezzy
|
||||
|
||||
// Download stats
|
||||
var status = await friend.RequestUserStats();
|
||||
var status = await friend.RequestUserStatsAsync();
|
||||
Assert.AreNotEqual( false, status );
|
||||
|
||||
var deaths = friend.GetStatInt( "deaths" );
|
||||
|
@ -22,7 +22,7 @@ internal override void InitializeInterface( bool server )
|
||||
/// If the user has no stats will return fail
|
||||
/// these stats will only be auto-updated for clients playing on the server
|
||||
/// </summary>
|
||||
public static async Task<Result> RequestUserStats( SteamId steamid )
|
||||
public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
||||
{
|
||||
var r = await Internal.RequestUserStats( steamid );
|
||||
if ( !r.HasValue ) return Result.Fail;
|
||||
|
@ -189,7 +189,7 @@ public bool SendMessage( string message )
|
||||
/// Tries to get download the latest user stats
|
||||
/// </summary>
|
||||
/// <returns>True if successful, False if failure</returns>
|
||||
public async Task<bool> RequestUserStats()
|
||||
public async Task<bool> RequestUserStatsAsync()
|
||||
{
|
||||
var result = await SteamUserStats.Internal.RequestUserStats( Id );
|
||||
return result.HasValue && result.Value.Result == Result.OK;
|
||||
|
Loading…
Reference in New Issue
Block a user