mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +03:00
Server stats callback include client steamid
This commit is contained in:
parent
7bd8aaa793
commit
b62f7f6b87
@ -19,7 +19,7 @@ public void StatsGet()
|
|||||||
|
|
||||||
bool GotStats = false;
|
bool GotStats = false;
|
||||||
|
|
||||||
server.Stats.Refresh( MySteamId, success =>
|
server.Stats.Refresh( MySteamId, (steamid, success) =>
|
||||||
{
|
{
|
||||||
GotStats = true;
|
GotStats = true;
|
||||||
Assert.IsTrue( success );
|
Assert.IsTrue( success );
|
||||||
|
@ -31,7 +31,7 @@ public struct StatsReceived
|
|||||||
/// this will be called when the stats are recieved, the bool will signify whether
|
/// this will be called when the stats are recieved, the bool will signify whether
|
||||||
/// it was successful or not.
|
/// it was successful or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Refresh( ulong steamid, Action<bool> Callback = null )
|
public void Refresh( ulong steamid, Action<ulong, bool> Callback = null )
|
||||||
{
|
{
|
||||||
if ( Callback == null )
|
if ( Callback == null )
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ public void Refresh( ulong steamid, Action<bool> Callback = null )
|
|||||||
|
|
||||||
server.native.gameServerStats.RequestUserStats( steamid, ( o, failed ) =>
|
server.native.gameServerStats.RequestUserStats( steamid, ( o, failed ) =>
|
||||||
{
|
{
|
||||||
Callback( o.Result == SteamNative.Result.OK && !failed );
|
Callback( steamid, o.Result == SteamNative.Result.OK && !failed );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ public void Refresh( ulong steamid, Action<bool> Callback = null )
|
|||||||
/// You can do that using this function. The callback will let you know if
|
/// You can do that using this function. The callback will let you know if
|
||||||
/// your action succeeded, but most of the time you can fire and forget.
|
/// your action succeeded, but most of the time you can fire and forget.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Commit( ulong steamid, Action<bool> Callback = null )
|
public void Commit( ulong steamid, Action<ulong, bool> Callback = null )
|
||||||
{
|
{
|
||||||
if ( Callback == null )
|
if ( Callback == null )
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ public void Commit( ulong steamid, Action<bool> Callback = null )
|
|||||||
|
|
||||||
server.native.gameServerStats.StoreUserStats( steamid, ( o, failed ) =>
|
server.native.gameServerStats.StoreUserStats( steamid, ( o, failed ) =>
|
||||||
{
|
{
|
||||||
Callback( o.Result == SteamNative.Result.OK && !failed );
|
Callback( steamid, o.Result == SteamNative.Result.OK && !failed );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user