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