mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 14:48:02 +03:00
Only update Items if successful
This commit is contained in:
parent
600c4c53c0
commit
9da329bb7d
@ -56,20 +56,21 @@ namespace Facepunch.Steamworks
|
|||||||
if ( error ) return;
|
if ( error ) return;
|
||||||
|
|
||||||
var r = new Result( this, data.Handle );
|
var r = new Result( this, data.Handle );
|
||||||
|
if ( r.IsSuccess )
|
||||||
|
{
|
||||||
|
SerializedItems = r.Serialize();
|
||||||
|
SerializedExpireTime = DateTime.Now.Add( TimeSpan.FromMinutes( 60 ) );
|
||||||
|
|
||||||
SerializedItems = r.Serialize();
|
Items = r.Items;
|
||||||
SerializedExpireTime = DateTime.Now.Add( TimeSpan.FromMinutes( 60 ) );
|
|
||||||
|
|
||||||
Items = r.Items;
|
//
|
||||||
|
// Tell everyone we've got new items!
|
||||||
|
//
|
||||||
|
OnUpdate?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
r.Dispose();
|
r.Dispose();
|
||||||
r = null;
|
r = null;
|
||||||
|
|
||||||
//
|
|
||||||
// Tell everyone we've got new items!
|
|
||||||
//
|
|
||||||
OnUpdate?.Invoke();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user