Method AddItem
AddItem(string)
Adds a new entry of the specified InventoryItemDefinition by Id. Returns the new or existing InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing InventoryItem when the InventoryItem was already in the Wallet.
Declaration
public static InventoryItem AddItem(string itemdefinitionId)
Parameters
Type | Name | Description |
---|---|---|
string | itemdefinitionId | The Id of the InventoryItemDefinition we are adding. |
Returns
Type | Description |
---|---|
Inventory |
The new InventoryItem that was added, or null if Id is invalid. |
AddItem(int)
Adds more of the specified InventoryItemDefinition by Hash. Returns the new (or existing) InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing reference when to the InventoryItem when the InventoryItem was already in the Wallet.
Declaration
public static InventoryItem AddItem(int itemDefinitionHash)
Parameters
Type | Name | Description |
---|---|---|
int | itemDefinitionHash | The Hash of the InventoryItemDefinition we are adding. |
Returns
Type | Description |
---|---|
Inventory |
The InventoryItem that was added. |
AddItem(InventoryItemDefinition)
Adds more of the specified InventoryItemDefinition. Returns the new (or existing) InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing reference when to the InventoryItem when the InventoryItem was already in the Wallet.
Declaration
public static InventoryItem AddItem(InventoryItemDefinition itemDefinition)
Parameters
Type | Name | Description |
---|---|---|
Inventory |
itemDefinition | The InventoryItemDefinition we are adding. |
Returns
Type | Description |
---|---|
Inventory |
The InventoryItem that was added. |