Rise
The Vieneo Province
Loading...
Searching...
No Matches
isteaminventory.h
Go to the documentation of this file.
1//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
2//
3// Purpose: interface to Steam Inventory
4//
5//=============================================================================
6
7#ifndef ISTEAMINVENTORY_H
8#define ISTEAMINVENTORY_H
9#ifdef _WIN32
10#pragma once
11#endif
12
13#include "steam_api_common.h"
14
15// callbacks
16#if defined( VALVE_CALLBACK_PACK_SMALL )
17#pragma pack( push, 4 )
18#elif defined( VALVE_CALLBACK_PACK_LARGE )
19#pragma pack( push, 8 )
20#else
21#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
22#endif
23
24
25// Every individual instance of an item has a globally-unique ItemInstanceID.
26// This ID is unique to the combination of (player, specific item instance)
27// and will not be transferred to another player or re-used for another item.
29
31
32// Types of items in your game are identified by a 32-bit "item definition number".
33// Valid definition numbers are between 1 and 999999999; numbers less than or equal to
34// zero are invalid, and numbers greater than or equal to one billion (1x10^9) are
35// reserved for internal Steam use.
37
38
40{
41 // Item status flags - these flags are permanently attached to specific item instances
42 k_ESteamItemNoTrade = 1 << 0, // This item is account-locked and cannot be traded or given away.
43
44 // Action confirmation flags - these flags are set one time only, as part of a result set
45 k_ESteamItemRemoved = 1 << 8, // The item has been destroyed, traded away, expired, or otherwise invalidated
46 k_ESteamItemConsumed = 1 << 9, // The item quantity has been decreased by 1 via ConsumeItem API.
47
48 // All other flag bits are currently reserved for internal Steam use at this time.
49 // Do not assume anything about the state of other flags which are not defined here.
50};
51
59
61
63
66
67//-----------------------------------------------------------------------------
68// Purpose: Steam Inventory query and manipulation API
69//-----------------------------------------------------------------------------
71{
72public:
73
74 // INVENTORY ASYNC RESULT MANAGEMENT
75 //
76 // Asynchronous inventory queries always output a result handle which can be used with
77 // GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will
78 // be triggered when the asynchronous result becomes ready (or fails).
79 //
80
81 // Find out the status of an asynchronous inventory result handle. Possible values:
82 // k_EResultPending - still in progress
83 // k_EResultOK - done, result ready
84 // k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult)
85 // k_EResultInvalidParam - ERROR: invalid API call parameters
86 // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
87 // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
88 // k_EResultFail - ERROR: unknown / generic error
89 virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0;
90
91 // Copies the contents of a result set into a flat array. The specific
92 // contents of the result set depend on which query which was used.
93 virtual bool GetResultItems( SteamInventoryResult_t resultHandle,
94 STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
95 uint32 *punOutItemsArraySize ) = 0;
96
97 // In combination with GetResultItems, you can use GetResultItemProperty to retrieve
98 // dynamic string properties for a given item returned in the result set.
99 //
100 // Property names are always composed of ASCII letters, numbers, and/or underscores.
101 //
102 // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
103 // property names.
104 //
105 // If pchValueBuffer is NULL, *punValueBufferSize will contain the
106 // suggested buffer size. Otherwise it will be the number of bytes actually copied
107 // to pchValueBuffer. If the results do not fit in the given buffer, partial
108 // results may be copied.
110 uint32 unItemIndex,
111 const char *pchPropertyName,
112 STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
113
114 // Returns the server time at which the result was generated. Compare against
115 // the value of IClientUtils::GetServerRealTime() to determine age.
117
118 // Returns true if the result belongs to the target steam ID, false if the
119 // result does not. This is important when using DeserializeResult, to verify
120 // that a remote player is not pretending to have a different user's inventory.
121 virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0;
122
123 // Destroys a result handle and frees all associated memory.
124 virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
125
126
127 // INVENTORY ASYNC QUERY
128 //
129
130 // Captures the entire state of the current user's Steam inventory.
131 // You must call DestroyResult on this handle when you are done with it.
132 // Returns false and sets *pResultHandle to zero if inventory is unavailable.
133 // Note: calls to this function are subject to rate limits and may return
134 // cached results if called too frequently. It is suggested that you call
135 // this function only when you are about to display the user's full inventory,
136 // or if you expect that the inventory may have changed.
137 virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
138
139
140 // Captures the state of a subset of the current user's Steam inventory,
141 // identified by an array of item instance IDs. The results from this call
142 // can be serialized and passed to other players to "prove" that the current
143 // user owns specific items, without exposing the user's entire inventory.
144 // For example, you could call GetItemsByID with the IDs of the user's
145 // currently equipped cosmetic items and serialize this to a buffer, and
146 // then transmit this buffer to other players upon joining a game.
147 virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
148
149
150 // RESULT SERIALIZATION AND AUTHENTICATION
151 //
152 // Serialized result sets contain a short signature which can't be forged
153 // or replayed across different game sessions. A result set can be serialized
154 // on the local client, transmitted to other players via your game networking,
155 // and deserialized by the remote players. This is a secure way of preventing
156 // hackers from lying about posessing rare/high-value items.
157
158 // Serializes a result set with signature bytes to an output buffer. Pass
159 // NULL as an output buffer to get the required size via punOutBufferSize.
160 // The size of a serialized result depends on the number items which are being
161 // serialized. When securely transmitting items to other players, it is
162 // recommended to use "GetItemsByID" first to create a minimal result set.
163 // Results have a built-in timestamp which will be considered "expired" after
164 // an hour has elapsed. See DeserializeResult for expiration handling.
165 virtual bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0;
166
167 // Deserializes a result set and verifies the signature bytes. Returns false
168 // if bRequireFullOnlineVerify is set but Steam is running in Offline mode.
169 // Otherwise returns true and then delivers error codes via GetResultStatus.
170 //
171 // The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not
172 // be set to true by your game at this time.
173 //
174 // DeserializeResult has a potential soft-failure mode where the handle status
175 // is set to k_EResultExpired. GetResultItems() still succeeds in this mode.
176 // The "expired" result could indicate that the data may be out of date - not
177 // just due to timed expiration (one hour), but also because one of the items
178 // in the result set may have been traded or consumed since the result set was
179 // generated. You could compare the timestamp from GetResultTimestamp() to
180 // ISteamUtils::GetServerRealTime() to determine how old the data is. You could
181 // simply ignore the "expired" result code and continue as normal, or you
182 // could challenge the player with expired data to send an updated result set.
183 virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0;
184
185
186 // INVENTORY ASYNC MODIFICATION
187 //
188
189 // GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t
190 // notification with a matching nCallbackContext parameter. This API is only intended
191 // for prototyping - it is only usable by Steam accounts that belong to the publisher group
192 // for your game.
193 // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should
194 // describe the quantity of each item to generate.
195 virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
196
197 // GrantPromoItems() checks the list of promotional items for which the user may be eligible
198 // and grants the items (one time only). On success, the result set will include items which
199 // were granted, if any. If no items were granted because the user isn't eligible for any
200 // promotions, this is still considered a success.
201 virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0;
202
203 // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
204 // scanning for all eligible promotional items, the check is restricted to a single item
205 // definition or set of item definitions. This can be useful if your game has custom UI for
206 // showing a specific promo item to the user.
207 virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0;
208 virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0;
209
210 // ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
211 // Not for the faint of heart - if your game implements item removal at all, a high-friction
212 // UI confirmation process is highly recommended.
213 virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0;
214
215 // ExchangeItems() is an atomic combination of item generation and consumption.
216 // It can be used to implement crafting recipes or transmutations, or items which unpack
217 // themselves into other items (e.g., a chest).
218 // Exchange recipes are defined in the ItemDef, and explicitly list the required item
219 // types and resulting generated type.
220 // Exchange recipes are evaluated atomically by the Inventory Service; if the supplied
221 // components do not match the recipe, or do not contain sufficient quantity, the
222 // exchange will fail.
223 virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle,
224 STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
225 STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
226
227
228 // TransferItemQuantity() is intended for use with items which are "stackable" (can have
229 // quantity greater than one). It can be used to split a stack into two, or to transfer
230 // quantity from one stack into another stack of identical items. To split one stack into
231 // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated.
232 virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0;
233
234
235 // TIMED DROPS AND PLAYTIME CREDIT
236 //
237
238 // Deprecated. Calling this method is not required for proper playtime accounting.
239 virtual void SendItemDropHeartbeat() = 0;
240
241 // Playtime credit must be consumed and turned into item drops by your game. Only item
242 // definitions which are marked as "playtime item generators" can be spawned. The call
243 // will return an empty result set if there is not enough playtime credit for a drop.
244 // Your game should call TriggerItemDrop at an appropriate time for the user to receive
245 // new items, such as between rounds or while the player is dead. Note that players who
246 // hack their clients could modify the value of "dropListDefinition", so do not use it
247 // to directly control rarity.
248 // See your Steamworks configuration to set playtime drop rates for individual itemdefs.
249 // The client library will suppress too-frequent calls to this method.
250 virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
251
252
253 // Deprecated. This method is not supported.
254 virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner,
255 STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
256 STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
257
258
259 // ITEM DEFINITIONS
260 //
261 // Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000)
262 // to a set of string properties. Some of these properties are required to display items
263 // on the Steam community web site. Other properties can be defined by applications.
264 // Use of these functions is optional; there is no reason to call LoadItemDefinitions
265 // if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue
266 // weapon mod = 55) and does not allow for adding new item types without a client patch.
267 //
268
269 // LoadItemDefinitions triggers the automatic load and refresh of item definitions.
270 // Every time new item definitions are available (eg, from the dynamic addition of new
271 // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
272 // callback will be fired.
273 virtual bool LoadItemDefinitions() = 0;
274
275 // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
276 // defined via Steamworks configuration, and not necessarily contiguous integers).
277 // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will
278 // contain the total size necessary for a subsequent call. Otherwise, the call will
279 // return false if and only if there is not enough space in the output array.
281 STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
282 STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
283
284 // GetItemDefinitionProperty returns a string property from a given item definition.
285 // Note that some properties (for example, "name") may be localized and will depend
286 // on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).
287 // Property names are always composed of ASCII letters, numbers, and/or underscores.
288 // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
289 // property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the
290 // suggested buffer size. Otherwise it will be the number of bytes actually copied
291 // to pchValueBuffer. If the results do not fit in the given buffer, partial
292 // results may be copied.
293 virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
294 STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
295
296 // Request the list of "eligible" promo items that can be manually granted to the given
297 // user. These are promo items of type "manual" that won't be granted automatically.
298 // An example usage of this is an item that becomes available every week.
301
302 // After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this
303 // function to pull out the list of item definition ids that the user can be
304 // manually granted via the AddPromoItems() call.
306 CSteamID steamID,
307 STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
308 STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
309
310 // Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t
311 // will be posted if Steam was able to initialize the transaction.
312 //
313 // Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t
314 // will be posted.
316 virtual SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
317
318 // Request current prices for all applicable item definitions
321
322 // Returns the number of items with prices. Need to call RequestPrices() first.
324
325 // Returns item definition ids and their prices in the user's local currency.
326 // Need to call RequestPrices() first.
327 virtual bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
328 STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices,
329 STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices,
330 uint32 unArrayLength ) = 0;
331
332 // Retrieves the price for the item definition id
333 // Returns false if there is no price stored for the item definition.
334 virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) = 0;
335
336 // Create a request to update properties on items
338 // Remove the property on the item
339 virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0;
340 // Accessor methods to set properties on items
341
342 STEAM_FLAT_NAME( SetPropertyString )
343 virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0;
344
345 STEAM_FLAT_NAME( SetPropertyBool )
346 virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0;
347
348 STEAM_FLAT_NAME( SetPropertyInt64 )
349 virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0;
350
351 STEAM_FLAT_NAME( SetPropertyFloat )
352 virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0;
353
354 // Submit the update request by handle
356
357 virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
358};
359
360#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003"
361
362// Global interface accessor
365
366// Global accessor for the gameserver client
369
370// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
371// results transition from "Pending" to "OK" or an error state. There will
372// always be exactly one callback per handle.
379
380
381// SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems
382// successfully returns a result which is newer / fresher than the last
383// known result. (It will not trigger if the inventory hasn't changed,
384// or if results from two overlapping calls are reversed in flight and
385// the earlier result is already known to be stale/out-of-date.)
386// The normal ResultReady callback will still be triggered immediately
387// afterwards; this is an additional notification for your convenience.
393
394
395// A SteamInventoryDefinitionUpdate_t callback is triggered whenever
396// item definitions have been updated, which could be in response to
397// LoadItemDefinitions() or any other async request which required
398// a definition update in order to process results from the server.
403
404// Returned
406{
411 bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server
412};
413
414// Triggered from StartPurchase call
422
423
424// Triggered from RequestPrices
431
432#pragma pack( pop )
433
434
435#endif // ISTEAMCONTROLLER_H
virtual bool ConsumeItem(SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity)=0
virtual bool GetItemsWithPrices(STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices, STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices, uint32 unArrayLength)=0
virtual bool GetItemPrice(SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice)=0
virtual bool SerializeResult(SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize)=0
virtual SteamAPICall_t RequestPrices()=0
virtual bool TradeItems(SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength)=0
virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID)=0
virtual bool LoadItemDefinitions()=0
virtual bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected)=0
virtual bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue)=0
virtual bool GetAllItems(SteamInventoryResult_t *pResultHandle)=0
virtual uint32 GetResultTimestamp(SteamInventoryResult_t resultHandle)=0
virtual bool TriggerItemDrop(SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition)=0
virtual void DestroyResult(SteamInventoryResult_t resultHandle)=0
virtual EResult GetResultStatus(SteamInventoryResult_t resultHandle)=0
virtual uint32 GetNumItemsWithPrices()=0
virtual bool GetItemDefinitionIDs(STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t *pItemDefIDs, STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize)=0
virtual bool GetResultItems(SteamInventoryResult_t resultHandle, STEAM_OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t *pOutItemsArray, uint32 *punOutItemsArraySize)=0
virtual bool SubmitUpdateProperties(SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t *pResultHandle)=0
virtual bool DeserializeResult(SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE=false)=0
virtual bool GetEligiblePromoItemDefinitionIDs(CSteamID steamID, STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t *pItemDefIDs, STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize)=0
virtual bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, const char *pchPropertyName, STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut)=0
virtual bool GetResultItemProperty(SteamInventoryResult_t resultHandle, uint32 unItemIndex, const char *pchPropertyName, STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut)=0
virtual void SendItemDropHeartbeat()=0
virtual SteamInventoryUpdateHandle_t StartUpdateProperties()=0
virtual SteamAPICall_t StartPurchase(STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength)=0
virtual bool AddPromoItems(SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength)=0
virtual bool GetItemsByID(SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unCountInstanceIDs) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs)=0
virtual bool TransferItemQuantity(SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest)=0
virtual bool ExchangeItems(SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength)=0
virtual bool AddPromoItem(SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef)=0
virtual bool InspectItem(SteamInventoryResult_t *pResultHandle, const char *pchItemToken)=0
virtual bool RemoveProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName)=0
virtual bool GrantPromoItems(SteamInventoryResult_t *pResultHandle)=0
virtual bool GenerateItems(SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength)=0
static const SteamInventoryResult_t k_SteamInventoryResultInvalid
#define STEAMINVENTORY_INTERFACE_VERSION
int32 SteamItemDef_t
uint64 SteamItemInstanceID_t
int32 SteamInventoryResult_t
ISteamInventory * SteamInventory()
const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid
ISteamInventory * SteamGameServerInventory()
uint64 SteamInventoryUpdateHandle_t
static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid
ESteamItemFlags
@ k_ESteamItemRemoved
@ k_ESteamItemConsumed
@ k_ESteamItemNoTrade
const char *typedef uint32(S_CALLTYPE *SteamAPI_CheckCallbackRegistered_t)(int iCallbackNum)
#define STEAM_DEFINE_USER_INTERFACE_ACCESSOR(type, name, version)
#define STEAM_ARRAY_COUNT(COUNTER)
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC)
@ k_iSteamInventoryCallbacks
#define STEAM_FLAT_NAME(NAME)
#define STEAM_CALL_RESULT(RESULT_TYPE)
#define STEAM_OUT_BUFFER_COUNT(COUNTER)
#define STEAM_DESC(DESC)
#define STEAM_BUFFER_COUNT(COUNTER)
#define STEAM_OUT_STRING_COUNT(COUNTER)
#define STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(type, name, version)
unsigned short uint16
Definition steamtypes.h:56
unsigned long long uint64
Definition steamtypes.h:60
int int32
Definition steamtypes.h:57
uint64 SteamAPICall_t
Definition steamtypes.h:93
long long int64
Definition steamtypes.h:59
SteamInventoryResult_t m_handle
SteamInventoryResult_t m_handle
SteamItemInstanceID_t m_itemId
SteamItemDef_t m_iDefinition