Method GetQuantity
GetQuantity(string)
Gets the Quantity of an InventoryItem by its InventoryItemDefinition id
Declaration
public int GetQuantity(string inventoryItemDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
string | inventoryItemDefinitionId | InventoryItemDefinition id of the item's quantity to get |
Returns
Type | Description |
---|---|
int | Quantity of the requested Inventory Item. |
Exceptions
Type | Condition |
---|---|
Argument |
The parameter id is null or empty |
GetQuantity(int)
Gets the Quantity of an InventoryItem by its InventoryItemDefinition hash
Declaration
public int GetQuantity(int inventoryItemDefinitionHash)
Parameters
Type | Name | Description |
---|---|---|
int | inventoryItemDefinitionHash | InventoryItemDefinition hash of the item's quantity to get |
Returns
Type | Description |
---|---|
int | Quantity of the requested Inventory Item. |
Exceptions
Type | Condition |
---|---|
Key |
The hash provided doesn't correspond to a valid item |
GetQuantity(InventoryItem)
Gets the Quantity of an InventoryItem by its reference
Declaration
public int GetQuantity(InventoryItem inventoryItem)
Parameters
Type | Name | Description |
---|---|---|
Inventory |
inventoryItem | InventoryItem reference of the item's quantity to get |
Returns
Type | Description |
---|---|
int | Quantity of the requested Inventory Item. |
Exceptions
Type | Condition |
---|---|
Argument |
The parameter id is null |