Server stats callback include client steamid

This commit is contained in:
Garry Newman 2017-07-31 12:56:15 +01:00
parent 7bd8aaa793
commit b62f7f6b87
2 changed files with 5 additions and 5 deletions

View File

@ -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 );

View File

@ -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 );
} ); } );
} }