Beamable SDK
|
This type defines the Inventory feature's updates. More...
Public Member Functions | |
InventoryUpdateBuilder (Dictionary< string, long > currencies, Dictionary< string, List< CurrencyProperty > > currencyProperties, List< ItemCreateRequest > newItems, List< ItemDeleteRequest > deleteItems, List< ItemUpdateRequest > updateItems) | |
InventoryUpdateBuilder | ApplyVipBonus (bool apply) |
Mutate the InventoryUpdateBuilder's applyVipBonus field. When the vip bonus is enabled, any currencies configured with the CurrencyChange method will have vip bonus multipliers included in the reward. More... | |
InventoryUpdateBuilder | CurrencyChange (string contentId, long amount) |
Add or remove currency from the player's inventory. Multiple calls to this method for the same currency will combine into one currency update. More... | |
InventoryUpdateBuilder | SetCurrencyProperties (string contentId, List< CurrencyProperty > properties) |
Set the CurrencyProperty values for a currency. This will overwrite the previous currency properties. More... | |
InventoryUpdateBuilder | AddItem (string contentId, Dictionary< string, string > properties=null, string requestId=null) |
Add an item instance to the inventory. More... | |
InventoryUpdateBuilder | AddItem (ItemRef itemRef, Dictionary< string, string > properties=null) |
Add an item instance to the inventory. More... | |
InventoryUpdateBuilder | DeleteItem (string contentId, long itemId) |
Remove a specific item instance from the inventory More... | |
InventoryUpdateBuilder | DeleteItem< TContent > (long itemId) |
Remove a specific item instance from the inventory More... | |
InventoryUpdateBuilder | DeleteItem< TContent > (InventoryObject< TContent > item) |
Remove a specific item instance from the inventory More... | |
InventoryUpdateBuilder | UpdateItem (string contentId, long itemId, Dictionary< string, string > properties) |
Update the instance properties of a specific item More... | |
InventoryUpdateBuilder | UpdateItem< TContent > (long itemId, Dictionary< string, string > properties) |
Update the instance properties of a specific item More... | |
InventoryUpdateBuilder | UpdateItem< TContent > (InventoryObject< TContent > item) |
Update the instance properties of a specific item More... | |
Public Attributes | |
readonly SerializableDictionaryStringToLong | currencies |
readonly SerializedDictionaryStringToCurrencyPropertyList | currencyProperties |
readonly List< ItemCreateRequest > | newItems |
readonly List< ItemDeleteRequest > | deleteItems |
readonly List< ItemUpdateRequest > | updateItems |
bool? | applyVipBonus |
Properties | |
bool | IsEmpty [get] |
Checks if the InventoryUpdateBuilder has any inventory updates. True if there are no updates, false otherwise. | |
This type defines the Inventory feature's updates.
InventoryUpdateBuilder Beamable.Common.Api.Inventory.InventoryUpdateBuilder.AddItem | ( | ItemRef | itemRef, |
Dictionary< string, string > | properties = null |
||
) |
Add an item instance to the inventory.
itemRef | An ItemRef for the item type |
properties | A set of instance level item properties |
|
inline |
Add an item instance to the inventory.
contentId | The content ID for an item type |
properties | A set of instance level item properties |
requestId | An ID that symbolizes the addition of the item. By default, this will be set to a random GUID. |
|
inline |
Mutate the InventoryUpdateBuilder's applyVipBonus field. When the vip bonus is enabled, any currencies configured with the CurrencyChange method will have vip bonus multipliers included in the reward.
apply | true to have currencies apply vip bonus, false otherwise |
|
inline |
Add or remove currency from the player's inventory. Multiple calls to this method for the same currency will combine into one currency update.
For example, if you changed up by 5, and then changed up again by 5, the final result would be 10
contentId | The content ID for a currency value |
amount | The amount to change the given currency. Positive numbers add currency, and negative numbers subtract currency. |
|
inline |
Remove a specific item instance from the inventory
contentId | The content ID for an item type |
itemId | The item instance ID |
|
inline |
Remove a specific item instance from the inventory
item | The InventoryObject<TContent> to remove from the inventory |
TContent | The type of item to remove |
TContent | : | ItemContent | |
TContent | : | new() |
|
inline |
Remove a specific item instance from the inventory
itemId | The item instance ID |
TContent | The type of item to remove |
TContent | : | ItemContent | |
TContent | : | new() |
|
inline |
Set the CurrencyProperty values for a currency. This will overwrite the previous currency properties.
contentId | The content ID for a currency value |
properties | A list of CurrencyProperty values |
|
inline |
Update the instance properties of a specific item
contentId | The content ID for an item type |
itemId | The item instance ID |
properties | The new instance properties for the item. This will overwrite the existing properties. |
|
inline |
Update the instance properties of a specific item
item | The InventoryObject<TContent> to remove from the inventory |
TContent | The type of item to remove |
TContent | : | ItemContent | |
TContent | : | new() |
|
inline |
Update the instance properties of a specific item
itemId | The item instance ID |
properties | The new instance properties for the item. This will overwrite the existing properties. |
TContent | The type of item to remove |
TContent | : | ItemContent | |
TContent | : | new() |