mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-14 07:38:06 +03:00
Added InventoryResult.BelongsTo( <steamid> )
This commit is contained in:
parent
cf2bc51c54
commit
a1599e3226
@ -295,6 +295,8 @@ namespace Steamworks
|
||||
if ( !Internal.DeserializeResult( ref sresult, (IntPtr)ptr, (uint)dataLength, false ) )
|
||||
return null;
|
||||
|
||||
|
||||
|
||||
return await InventoryResult.GetAsync( sresult.Value );
|
||||
}
|
||||
finally
|
||||
|
@ -30,6 +30,15 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether an inventory result handle belongs to the specified Steam ID.
|
||||
/// This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory
|
||||
/// </summary>
|
||||
public bool BelongsTo( SteamId steamId )
|
||||
{
|
||||
return SteamInventory.Internal.CheckResultSteamID( _id, steamId );
|
||||
}
|
||||
|
||||
public InventoryItem[] GetItems( bool includeProperties = false )
|
||||
{
|
||||
uint cnt = (uint) ItemCount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user