diff --git a/Facepunch.Steamworks/SteamInventory.cs b/Facepunch.Steamworks/SteamInventory.cs index 65ff914..f0a63c0 100644 --- a/Facepunch.Steamworks/SteamInventory.cs +++ b/Facepunch.Steamworks/SteamInventory.cs @@ -177,7 +177,7 @@ namespace Steamworks /// public static bool GetAllItems() { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; return Internal.GetAllItems( ref sresult ); } @@ -186,7 +186,7 @@ namespace Steamworks /// public static async Task GetAllItemsAsync() { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; if ( !Internal.GetAllItems( ref sresult ) ) return null; @@ -202,7 +202,7 @@ namespace Steamworks /// public static async Task GenerateItemAsync( InventoryDef target, int amount ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; var defs = new InventoryDefId[] { target.Id }; var cnts = new uint[] { (uint)amount }; @@ -220,7 +220,7 @@ namespace Steamworks /// public static async Task CraftItemAsync( InventoryItem[] list, InventoryDef target ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; var give = new InventoryDefId[] { target.Id }; var givec = new uint[] { 1 }; @@ -241,7 +241,7 @@ namespace Steamworks /// public static async Task CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; var give = new InventoryDefId[] { target.Id }; var givec = new uint[] { 1 }; @@ -283,7 +283,7 @@ namespace Steamworks { 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 ) ) return null; @@ -304,7 +304,7 @@ namespace Steamworks /// public static async Task GrantPromoItemsAsync() { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; if ( !Internal.GrantPromoItems( ref sresult ) ) return null; @@ -318,7 +318,7 @@ namespace Steamworks /// public static async Task TriggerItemDropAsync( InventoryDefId id ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; if ( !Internal.TriggerItemDrop( ref sresult, id ) ) return null; @@ -332,7 +332,7 @@ namespace Steamworks /// public static async Task AddPromoItemAsync( InventoryDefId id ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; if ( !Internal.AddPromoItem( ref sresult, id ) ) return null; diff --git a/Facepunch.Steamworks/Structs/InventoryItem.cs b/Facepunch.Steamworks/Structs/InventoryItem.cs index 27c76a5..4a917b5 100644 --- a/Facepunch.Steamworks/Structs/InventoryItem.cs +++ b/Facepunch.Steamworks/Structs/InventoryItem.cs @@ -53,7 +53,7 @@ namespace Steamworks /// public async Task ConsumeAsync( int amount = 1 ) { - var sresult = default( SteamInventoryResult_t ); + var sresult = Defines.k_SteamInventoryResultInvalid; if ( !SteamInventory.Internal.ConsumeItem( ref sresult, Id, (uint)amount ) ) return null; @@ -65,7 +65,7 @@ namespace Steamworks /// public async Task 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 ) ) return null; @@ -77,7 +77,7 @@ namespace Steamworks /// public async Task 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 ) ) return null;