mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-14 07:38:06 +03:00
use Defines.k_SteamInventoryResultInvalid instead of default
This commit is contained in:
parent
9db103cb2f
commit
631969360c
@ -177,7 +177,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool GetAllItems()
|
public static bool GetAllItems()
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
return Internal.GetAllItems( ref sresult );
|
return Internal.GetAllItems( ref sresult );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> GetAllItemsAsync()
|
public static async Task<InventoryResult?> GetAllItemsAsync()
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
if ( !Internal.GetAllItems( ref sresult ) )
|
if ( !Internal.GetAllItems( ref sresult ) )
|
||||||
return null;
|
return null;
|
||||||
@ -202,7 +202,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> GenerateItemAsync( InventoryDef target, int amount )
|
public static async Task<InventoryResult?> GenerateItemAsync( InventoryDef target, int amount )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
var defs = new InventoryDefId[] { target.Id };
|
var defs = new InventoryDefId[] { target.Id };
|
||||||
var cnts = new uint[] { (uint)amount };
|
var cnts = new uint[] { (uint)amount };
|
||||||
@ -220,7 +220,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem[] list, InventoryDef target )
|
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem[] list, InventoryDef target )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
var give = new InventoryDefId[] { target.Id };
|
var give = new InventoryDefId[] { target.Id };
|
||||||
var givec = new uint[] { 1 };
|
var givec = new uint[] { 1 };
|
||||||
@ -241,7 +241,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target )
|
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
var give = new InventoryDefId[] { target.Id };
|
var give = new InventoryDefId[] { target.Id };
|
||||||
var givec = new uint[] { 1 };
|
var givec = new uint[] { 1 };
|
||||||
@ -283,7 +283,7 @@ namespace Steamworks
|
|||||||
{
|
{
|
||||||
Marshal.Copy( data, 0, ptr, dataLength );
|
Marshal.Copy( data, 0, ptr, dataLength );
|
||||||
|
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
if ( !Internal.DeserializeResult( ref sresult, (IntPtr)ptr, (uint)dataLength, false ) )
|
if ( !Internal.DeserializeResult( ref sresult, (IntPtr)ptr, (uint)dataLength, false ) )
|
||||||
return null;
|
return null;
|
||||||
@ -304,7 +304,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
if ( !Internal.GrantPromoItems( ref sresult ) )
|
if ( !Internal.GrantPromoItems( ref sresult ) )
|
||||||
return null;
|
return null;
|
||||||
@ -318,7 +318,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> TriggerItemDropAsync( InventoryDefId id )
|
public static async Task<InventoryResult?> TriggerItemDropAsync( InventoryDefId id )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
if ( !Internal.TriggerItemDrop( ref sresult, id ) )
|
if ( !Internal.TriggerItemDrop( ref sresult, id ) )
|
||||||
return null;
|
return null;
|
||||||
@ -332,7 +332,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> AddPromoItemAsync( InventoryDefId id )
|
public static async Task<InventoryResult?> AddPromoItemAsync( InventoryDefId id )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
|
|
||||||
if ( !Internal.AddPromoItem( ref sresult, id ) )
|
if ( !Internal.AddPromoItem( ref sresult, id ) )
|
||||||
return null;
|
return null;
|
||||||
|
@ -53,7 +53,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> ConsumeAsync( int amount = 1 )
|
public async Task<InventoryResult?> ConsumeAsync( int amount = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
if ( !SteamInventory.Internal.ConsumeItem( ref sresult, Id, (uint)amount ) )
|
if ( !SteamInventory.Internal.ConsumeItem( ref sresult, Id, (uint)amount ) )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> SplitStackAsync( int quantity = 1 )
|
public async Task<InventoryResult?> SplitStackAsync( int quantity = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, Id, (uint)quantity, ulong.MaxValue ) )
|
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, Id, (uint)quantity, ulong.MaxValue ) )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ namespace Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> AddAsync( InventoryItem add, int quantity = 1 )
|
public async Task<InventoryResult?> AddAsync( InventoryItem add, int quantity = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||||
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, add.Id, (uint)quantity, Id ) )
|
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, add.Id, (uint)quantity, Id ) )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user