SteamInventory
public struct SteamInventory: Sendable
Steamworks ISteamInventory
Access via inventory
through a SteamAPI
or SteamGameServerAPI
instance.
Topics
func addPromoItem(def: SteamItemDef) -> (rc: Bool, resultHandle: SteamInventoryResult)
func addPromoItem(def: SteamItemDef) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::AddPromoItem()
Declaration
public func addPromoItem(def: SteamItemDef) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func addPromoItems(arrayItemDefs: [SteamItemDef]) -> (rc: Bool, resultHandle: SteamInventoryResult)
func addPromoItems(arrayItemDefs: [SteamItemDef]) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::AddPromoItems()
Declaration
public func addPromoItems(arrayItemDefs: [SteamItemDef]) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func checkResultSteamID(handle: SteamInventoryResult, expected: SteamID) -> Bool
func checkResultSteamID(handle: SteamInventoryResult, expected: SteamID) -> Bool
Steamworks ISteamInventory::CheckResultSteamID()
Declaration
public func checkResultSteamID(handle: SteamInventoryResult, expected: SteamID)
-> Bool
func consumeItem(consume: SteamItemInstanceID, quantity: Int) -> (rc: Bool, resultHandle: SteamInventoryResult)
func consumeItem(consume: SteamItemInstanceID, quantity: Int) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::ConsumeItem()
Declaration
public func consumeItem(consume: SteamItemInstanceID, quantity: Int) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func deserializeResult(buffer: [UInt8], reservedMUSTBEFALSE: Bool) -> (rc: Bool, resultHandle: SteamInventoryResult)
func deserializeResult(buffer: [UInt8], reservedMUSTBEFALSE: Bool) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::DeserializeResult()
Declaration
public func deserializeResult(
buffer: [UInt8], reservedMUSTBEFALSE: Bool = false
) -> (rc: Bool, resultHandle: SteamInventoryResult)
func destroyResult(handle: SteamInventoryResult)
func destroyResult(handle: SteamInventoryResult)
Steamworks ISteamInventory::DestroyResult()
Declaration
public func destroyResult(handle: SteamInventoryResult)
func exchangeItems(arrayGenerate: [SteamItemDef], arrayGenerateQuantity: [Int], arrayDestroy: [SteamItemInstanceID], arrayDestroyQuantity: [Int]) -> (rc: Bool, resultHandle: SteamInventoryResult)
func exchangeItems(arrayGenerate: [SteamItemDef], arrayGenerateQuantity: [Int], arrayDestroy: [SteamItemInstanceID], arrayDestroyQuantity: [Int]) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::ExchangeItems()
Declaration
public func exchangeItems(
arrayGenerate: [SteamItemDef], arrayGenerateQuantity: [Int],
arrayDestroy: [SteamItemInstanceID], arrayDestroyQuantity: [Int]
) -> (rc: Bool, resultHandle: SteamInventoryResult)
func generateItems(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int]) -> (rc: Bool, resultHandle: SteamInventoryResult)
func generateItems(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int]) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::GenerateItems()
Declaration
public func generateItems(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int])
-> (rc: Bool, resultHandle: SteamInventoryResult)
func getAllItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
func getAllItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::GetAllItems()
Declaration
public func getAllItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
func getEligiblePromoItemDefinitionIDs(steamID: SteamID, itemDefIDsArraySize: Int) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
func getEligiblePromoItemDefinitionIDs(steamID: SteamID, itemDefIDsArraySize: Int) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
Steamworks ISteamInventory::GetEligiblePromoItemDefinitionIDs()
Declaration
public func getEligiblePromoItemDefinitionIDs(
steamID: SteamID, itemDefIDsArraySize: Int
) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
func getItemDefinitionIDs(returnItemDefIDs: Bool, itemDefIDsArraySize: Int) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
func getItemDefinitionIDs(returnItemDefIDs: Bool, itemDefIDsArraySize: Int) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
Steamworks ISteamInventory::GetItemDefinitionIDs()
Declaration
public func getItemDefinitionIDs(
returnItemDefIDs: Bool = true, itemDefIDsArraySize: Int
) -> (rc: Bool, itemDefIDs: [SteamItemDef], itemDefIDsArraySize: Int)
func getItemDefinitionProperty(definitionIndex: SteamItemDef, propertyName: String?, returnValueBuffer: Bool, valueBufferSize: Int) -> (rc: Bool, valueBuffer: String, valueBufferSize: Int)
func getItemDefinitionProperty(definitionIndex: SteamItemDef, propertyName: String?, returnValueBuffer: Bool, valueBufferSize: Int) -> (rc: Bool, valueBuffer: String, valueBufferSize: Int)
func getItemPrice(definitionIndex: SteamItemDef) -> (rc: Bool, currentPrice: UInt64, basePrice: UInt64)
func getItemPrice(definitionIndex: SteamItemDef) -> (rc: Bool, currentPrice: UInt64, basePrice: UInt64)
Steamworks ISteamInventory::GetItemPrice()
Declaration
public func getItemPrice(definitionIndex: SteamItemDef) -> (
rc: Bool, currentPrice: UInt64, basePrice: UInt64
)
func getItemsByID(instanceIDs: [SteamItemInstanceID]) -> (rc: Bool, resultHandle: SteamInventoryResult)
func getItemsByID(instanceIDs: [SteamItemInstanceID]) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::GetItemsByID()
Declaration
public func getItemsByID(instanceIDs: [SteamItemInstanceID]) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func getItemsWithPrices(arrayLength: Int) -> (rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64], basePrices: [UInt64])
func getItemsWithPrices(arrayLength: Int) -> (rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64], basePrices: [UInt64])
Steamworks ISteamInventory::GetItemsWithPrices()
Declaration
public func getItemsWithPrices(arrayLength: Int) -> (
rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64],
basePrices: [UInt64]
)
func getNumItemsWithPrices() -> Int
func getNumItemsWithPrices() -> Int
Steamworks ISteamInventory::GetNumItemsWithPrices()
Declaration
public func getNumItemsWithPrices() -> Int
func getResultItemProperty(handle: SteamInventoryResult, itemIndex: Int, propertyName: String?, returnValueBuffer: Bool, valueBufferSize: Int) -> (rc: Bool, valueBuffer: String, valueBufferSize: Int)
func getResultItemProperty(handle: SteamInventoryResult, itemIndex: Int, propertyName: String?, returnValueBuffer: Bool, valueBufferSize: Int) -> (rc: Bool, valueBuffer: String, valueBufferSize: Int)
func getResultItems(handle: SteamInventoryResult, returnItemsArray: Bool, itemsArraySize: Int) -> (rc: Bool, itemsArray: [SteamItemDetails], itemsArraySize: Int)
func getResultItems(handle: SteamInventoryResult, returnItemsArray: Bool, itemsArraySize: Int) -> (rc: Bool, itemsArray: [SteamItemDetails], itemsArraySize: Int)
Steamworks ISteamInventory::GetResultItems()
Declaration
public func getResultItems(
handle: SteamInventoryResult, returnItemsArray: Bool = true,
itemsArraySize: Int
) -> (rc: Bool, itemsArray: [SteamItemDetails], itemsArraySize: Int)
func getResultStatus(handle: SteamInventoryResult) -> Result
func getResultStatus(handle: SteamInventoryResult) -> Result
Steamworks ISteamInventory::GetResultStatus()
Declaration
public func getResultStatus(handle: SteamInventoryResult) -> Result
func getResultTimestamp(handle: SteamInventoryResult) -> RTime32
func getResultTimestamp(handle: SteamInventoryResult) -> RTime32
Steamworks ISteamInventory::GetResultTimestamp()
Declaration
public func getResultTimestamp(handle: SteamInventoryResult) -> RTime32
func grantPromoItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
func grantPromoItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::GrantPromoItems()
Declaration
public func grantPromoItems() -> (rc: Bool, resultHandle: SteamInventoryResult)
func inspectItem(itemToken: String) -> (rc: Bool, resultHandle: SteamInventoryResult)
func inspectItem(itemToken: String) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::InspectItem()
Declaration
public func inspectItem(itemToken: String) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func loadItemDefinitions() -> Bool
func loadItemDefinitions() -> Bool
Steamworks ISteamInventory::LoadItemDefinitions()
Declaration
@discardableResult
public func loadItemDefinitions() -> Bool
func removeProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String) -> Bool
func removeProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String) -> Bool
Steamworks ISteamInventory::RemoveProperty()
Declaration
public func removeProperty(
handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID,
propertyName: String
) -> Bool
func requestEligiblePromoItemDefinitionsIDs(steamID: SteamID, completion: (sending SteamInventoryEligiblePromoItemDefIDs?) -> Void)
func requestEligiblePromoItemDefinitionsIDs(steamID: SteamID, completion: (sending SteamInventoryEligiblePromoItemDefIDs?) -> Void)
Steamworks ISteamInventory::RequestEligiblePromoItemDefinitionsIDs()
, callback
Declaration
public func requestEligiblePromoItemDefinitionsIDs(
steamID: SteamID,
completion: @Sendable @escaping (
sending SteamInventoryEligiblePromoItemDefIDs?
) -> Void)
func requestEligiblePromoItemDefinitionsIDs(isolation: isolated (any Actor)?, steamID: SteamID) async -> SteamInventoryEligiblePromoItemDefIDs?
func requestEligiblePromoItemDefinitionsIDs(isolation: isolated (any Actor)?, steamID: SteamID) async -> SteamInventoryEligiblePromoItemDefIDs?
Steamworks ISteamInventory::RequestEligiblePromoItemDefinitionsIDs()
, async
Declaration
public func requestEligiblePromoItemDefinitionsIDs(
isolation: isolated (any Actor)? = #isolation, steamID: SteamID
) async -> SteamInventoryEligiblePromoItemDefIDs?
func requestPrices(completion: (sending SteamInventoryRequestPricesResult?) -> Void)
func requestPrices(completion: (sending SteamInventoryRequestPricesResult?) -> Void)
Steamworks ISteamInventory::RequestPrices()
, callback
Declaration
public func requestPrices(
completion: @Sendable @escaping (sending SteamInventoryRequestPricesResult?)
-> Void)
func requestPrices(isolation: isolated (any Actor)?) async -> SteamInventoryRequestPricesResult?
func requestPrices(isolation: isolated (any Actor)?) async -> SteamInventoryRequestPricesResult?
Steamworks ISteamInventory::RequestPrices()
, async
Declaration
public func requestPrices(isolation: isolated (any Actor)? = #isolation) async
-> SteamInventoryRequestPricesResult?
func sendItemDropHeartbeat()
func sendItemDropHeartbeat()
Steamworks ISteamInventory::SendItemDropHeartbeat()
Declaration
public func sendItemDropHeartbeat()
func serializeResult(handle: SteamInventoryResult, returnBuffer: Bool, bufferSize: Int) -> (rc: Bool, buffer: [UInt8], bufferSize: Int)
func serializeResult(handle: SteamInventoryResult, returnBuffer: Bool, bufferSize: Int) -> (rc: Bool, buffer: [UInt8], bufferSize: Int)
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Bool) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Bool) -> Bool
Steamworks ISteamInventory::SetProperty()
Declaration
public func setProperty(
handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID,
propertyName: String, value: Bool
) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Float) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Float) -> Bool
Steamworks ISteamInventory::SetProperty()
Declaration
public func setProperty(
handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID,
propertyName: String, value: Float
) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Int) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, value: Int) -> Bool
Steamworks ISteamInventory::SetProperty()
Declaration
public func setProperty(
handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID,
propertyName: String, value: Int
) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, propertyValue: String) -> Bool
func setProperty(handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID, propertyName: String, propertyValue: String) -> Bool
Steamworks ISteamInventory::SetProperty()
Declaration
public func setProperty(
handle: SteamInventoryUpdateHandle, itemID: SteamItemInstanceID,
propertyName: String, propertyValue: String
) -> Bool
func startPurchase(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int], completion: (sending SteamInventoryStartPurchaseResult?) -> Void)
func startPurchase(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int], completion: (sending SteamInventoryStartPurchaseResult?) -> Void)
Steamworks ISteamInventory::StartPurchase()
, callback
Declaration
public func startPurchase(
arrayItemDefs: [SteamItemDef], arrayQuantity: [Int],
completion: @Sendable @escaping (sending SteamInventoryStartPurchaseResult?)
-> Void)
func startPurchase(isolation: isolated (any Actor)?, arrayItemDefs: [SteamItemDef], arrayQuantity: [Int]) async -> SteamInventoryStartPurchaseResult?
func startPurchase(isolation: isolated (any Actor)?, arrayItemDefs: [SteamItemDef], arrayQuantity: [Int]) async -> SteamInventoryStartPurchaseResult?
Steamworks ISteamInventory::StartPurchase()
, async
Declaration
public func startPurchase(
isolation: isolated (any Actor)? = #isolation,
arrayItemDefs: [SteamItemDef], arrayQuantity: [Int]
) async -> SteamInventoryStartPurchaseResult?
func startUpdateProperties() -> SteamInventoryUpdateHandle
func startUpdateProperties() -> SteamInventoryUpdateHandle
Steamworks ISteamInventory::StartUpdateProperties()
Declaration
public func startUpdateProperties() -> SteamInventoryUpdateHandle
func submitUpdateProperties(handle: SteamInventoryUpdateHandle) -> (rc: Bool, resultHandle: SteamInventoryResult)
func submitUpdateProperties(handle: SteamInventoryUpdateHandle) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::SubmitUpdateProperties()
Declaration
public func submitUpdateProperties(handle: SteamInventoryUpdateHandle) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func transferItemQuantity(idSource: SteamItemInstanceID, quantity: Int, idDest: SteamItemInstanceID) -> (rc: Bool, resultHandle: SteamInventoryResult)
func transferItemQuantity(idSource: SteamItemInstanceID, quantity: Int, idDest: SteamItemInstanceID) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::TransferItemQuantity()
Declaration
public func transferItemQuantity(
idSource: SteamItemInstanceID, quantity: Int, idDest: SteamItemInstanceID
) -> (rc: Bool, resultHandle: SteamInventoryResult)
func triggerItemDrop(listDefinition: SteamItemDef) -> (rc: Bool, resultHandle: SteamInventoryResult)
func triggerItemDrop(listDefinition: SteamItemDef) -> (rc: Bool, resultHandle: SteamInventoryResult)
Steamworks ISteamInventory::TriggerItemDrop()
Declaration
public func triggerItemDrop(listDefinition: SteamItemDef) -> (
rc: Bool, resultHandle: SteamInventoryResult
)
func getItemDefinitionIDs() -> (rc: Bool, itemDefIDs: [SteamItemDef])
func getItemDefinitionIDs() -> (rc: Bool, itemDefIDs: [SteamItemDef])
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::GetItemDefinitionIDs()
Declaration
public func getItemDefinitionIDs() -> (rc: Bool, itemDefIDs: [SteamItemDef])
func getItemDefinitionProperty(definitionIndex: SteamItemDef, propertyName: String?) -> (rc: Bool, valueBuffer: String)
func getItemDefinitionProperty(definitionIndex: SteamItemDef, propertyName: String?) -> (rc: Bool, valueBuffer: String)
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::GetItemDefinitionProperty()
Declaration
public func getItemDefinitionProperty(
definitionIndex: SteamItemDef, propertyName: String?
) -> (rc: Bool, valueBuffer: String)
func getItemsWithPrices() -> (rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64], basePrices: [UInt64])
func getItemsWithPrices() -> (rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64], basePrices: [UInt64])
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::GetItemsWithPrices()
Declaration
public func getItemsWithPrices() -> (
rc: Bool, arrayItemDefs: [SteamItemDef], currentPrices: [UInt64],
basePrices: [UInt64]
)
func getResultItems(handle: SteamInventoryResult) -> (rc: Bool, itemsArray: [SteamItemDetails])
func getResultItems(handle: SteamInventoryResult) -> (rc: Bool, itemsArray: [SteamItemDetails])
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::GetResultItems()
Declaration
public func getResultItems(handle: SteamInventoryResult) -> (
rc: Bool, itemsArray: [SteamItemDetails]
)
func getResultItemProperty(handle: SteamInventoryResult, itemIndex: Int, propertyName: String?) -> (rc: Bool, valueBuffer: String)
func getResultItemProperty(handle: SteamInventoryResult, itemIndex: Int, propertyName: String?) -> (rc: Bool, valueBuffer: String)
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::GetResultItemProperty()
Declaration
public func getResultItemProperty(
handle: SteamInventoryResult, itemIndex: Int, propertyName: String?
) -> (rc: Bool, valueBuffer: String)
func serializeResult(handle: SteamInventoryResult) -> (rc: Bool, buffer: [UInt8])
func serializeResult(handle: SteamInventoryResult) -> (rc: Bool, buffer: [UInt8])
Provided by module SteamworksHelpers
.
Steamworks ISteamInventory::SerializeResult()
Declaration
public func serializeResult(handle: SteamInventoryResult) -> (
rc: Bool, buffer: [UInt8]
)