Example #1
0
 /// <summary>
 /// <para> AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of</para>
 /// <para> scanning for all eligible promotional items, the check is restricted to a single item</para>
 /// <para> definition or set of item definitions. This can be useful if your game has custom UI for</para>
 /// <para> showing a specific promo item to the user.</para>
 /// </summary>
 public static bool AddPromoItem(out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamInventory_AddPromoItem(CSteamAPIContext.GetSteamInventory(), out pResultHandle, itemDef));
 }
Example #2
0
 /// <summary>
 /// <para> Playtime credit must be consumed and turned into item drops by your game. Only item</para>
 /// <para> definitions which are marked as "playtime item generators" can be spawned. The call</para>
 /// <para> will return an empty result set if there is not enough playtime credit for a drop.</para>
 /// <para> Your game should call TriggerItemDrop at an appropriate time for the user to receive</para>
 /// <para> new items, such as between rounds or while the player is dead. Note that players who</para>
 /// <para> hack their clients could modify the value of "dropListDefinition", so do not use it</para>
 /// <para> to directly control rarity. It is primarily useful during testing and development,</para>
 /// <para> where you may wish to perform experiments with different types of drops.</para>
 /// </summary>
 public static bool TriggerItemDrop(out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamInventory_TriggerItemDrop(out pResultHandle, dropListDefinition));
 }
Example #3
0
 /// <summary>
 /// <para> Playtime credit must be consumed and turned into item drops by your game. Only item</para>
 /// <para> definitions which are marked as "playtime item generators" can be spawned. The call</para>
 /// <para> will return an empty result set if there is not enough playtime credit for a drop.</para>
 /// <para> Your game should call TriggerItemDrop at an appropriate time for the user to receive</para>
 /// <para> new items, such as between rounds or while the player is dead. Note that players who</para>
 /// <para> hack their clients could modify the value of "dropListDefinition", so do not use it</para>
 /// <para> to directly control rarity.</para>
 /// <para> See your Steamworks configuration to set playtime drop rates for individual itemdefs.</para>
 /// <para> The client library will suppress too-frequent calls to this method.</para>
 /// </summary>
 public static bool TriggerItemDrop(out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerInventory_TriggerItemDrop(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, dropListDefinition));
 }
Example #4
0
 /// <summary>
 /// <para> AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of</para>
 /// <para> scanning for all eligible promotional items, the check is restricted to a single item</para>
 /// <para> definition or set of item definitions. This can be useful if your game has custom UI for</para>
 /// <para> showing a specific promo item to the user.</para>
 /// </summary>
 public static bool AddPromoItem(out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerInventory_AddPromoItem(out pResultHandle, itemDef));
 }
Example #5
0
 public static bool GetItemPrice(SteamItemDef_t iDefinition, out ulong pCurrentPrice, out ulong pBasePrice)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamInventory_GetItemPrice(CSteamAPIContext.GetSteamInventory(), iDefinition, out pCurrentPrice, out pBasePrice));
 }
Example #6
0
 /// <summary>
 /// <para> Retrieves the price for the item definition id</para>
 /// <para> Returns false if there is no price stored for the item definition.</para>
 /// </summary>
 public static bool GetItemPrice(SteamItemDef_t iDefinition, out ulong pPrice)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamInventory_GetItemPrice(CSteamGameServerAPIContext.GetSteamInventory(), iDefinition, out pPrice));
 }
Example #7
0
 /// Retrieves the price for the item definition id
 /// Returns false if there is no price stored for the item definition.
 public static bool GetItemPrice(SteamItemDef_t iDefinition, out ulong pCurrentPrice, out ulong pBasePrice)
 {
     pCurrentPrice = (ulong)0;
     pBasePrice    = (ulong)0;
     return(false);
 }
Example #8
0
 /// GetItemDefinitionProperty returns a string property from a given item definition.
 /// Note that some properties (for example, "name") may be localized and will depend
 /// on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).
 /// Property names are always composed of ASCII letters, numbers, and/or underscores.
 /// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
 /// property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the
 /// suggested buffer size. Otherwise it will be the number of bytes actually copied
 /// to pchValueBuffer. If the results do not fit in the given buffer, partial
 /// results may be copied.
 public static bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut)
 {
     pchValueBuffer = "";
     return(false);
 }
Example #9
0
 /// Playtime credit must be consumed and turned into item drops by your game. Only item
 /// definitions which are marked as "playtime item generators" can be spawned. The call
 /// will return an empty result set if there is not enough playtime credit for a drop.
 /// Your game should call TriggerItemDrop at an appropriate time for the user to receive
 /// new items, such as between rounds or while the player is dead. Note that players who
 /// hack their clients could modify the value of "dropListDefinition", so do not use it
 /// to directly control rarity.
 /// See your Steamworks configuration to set playtime drop rates for individual itemdefs.
 /// The client library will suppress too-frequent calls to this method.
 public static bool TriggerItemDrop(out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition)
 {
     pResultHandle = (SteamInventoryResult_t)0;
     return(false);
 }
Example #10
0
 /// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
 /// scanning for all eligible promotional items, the check is restricted to a single item
 /// definition or set of item definitions. This can be useful if your game has custom UI for
 /// showing a specific promo item to the user.
 public static bool AddPromoItem(out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef)
 {
     pResultHandle = (SteamInventoryResult_t)0;
     return(false);
 }