Method SetQuantity
SetQuantity(string, int)
Sets the quantity of the specified InventoryItem by InventoryItemDefinition Id in this Inventory.
Declaration
public void SetQuantity(string itemDefinitionId, int quantity)
Parameters
Type | Name | Description |
---|---|---|
string | itemDefinitionId | The Id of the InventoryItemDefinition to set quantity for. |
int | quantity | The new quantity for specified InventoryItemDefinition. |
SetQuantity(int, int)
Sets the quantity of the specified InventoryItem by InventoryItemDefinition Hash in this Inventory.
Declaration
public void SetQuantity(int itemDefinitionHash, int quantity)
Parameters
Type | Name | Description |
---|---|---|
int | itemDefinitionHash | The Hash of the InventoryItemDefinition to set. |
int | quantity | The new quantity for the specified InventoryItemDefinition. |
SetQuantity(InventoryItem, int)
Sets the quantity of the InventoryItem instance within this Inventory.
Declaration
public void SetQuantity(InventoryItem item, int quantity)
Parameters
Type | Name | Description |
---|---|---|
InventoryItem | item | The InventoryItem to set quantity for in this Inventory. |
int | quantity | The new value for quantity for this InventoryItem. |