Method GetValue
GetValue(GameItem, StatDefinition)
Gets specified StatDefinition from specified GameItem.
Declaration
public static StatValue GetValue(GameItem gameItem, StatDefinition statDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| GameItem | gameItem | The GameItem to search for desired StatDefinition. |
| StatDefinition | statDefinition | StatDefinition this method is to act upon. |
Returns
| Type | Description |
|---|---|
| StatValue | StatValue for specified StatDefinition on specified GameItem. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the gameItem argument is null. |
| ArgumentNullException | If the statDefinition argument is null. |
GetValue(GameItem, string)
Gets specified StatDefinition from specified GameItem.
Declaration
public static StatValue GetValue(GameItem gameItem, string statDefinitionId)
Parameters
| Type | Name | Description |
|---|---|---|
| GameItem | gameItem | The GameItem to search for desired StatDefinition. |
| string | statDefinitionId | Id of StatDefinition this method is to act upon. |
Returns
| Type | Description |
|---|---|
| StatValue | StatValue for specified StatDefinition on specified GameItem. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the gameItem argument is null. |
| ArgumentException | If the statDefinitionId is null or empty. |
| StatDefinitionNotFoundException | If the StatDefinition is not found. |
GetValue(string, StatDefinition)
Gets specified StatDefinition from specified GameItem.
Declaration
public static StatValue GetValue(string gameItemId, StatDefinition statDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| string | gameItemId | GameItem upon which StatManager is to get the stat. |
| StatDefinition | statDefinition | StatDefinition this method is to act upon. |
Returns
| Type | Description |
|---|---|
| StatValue | StatValue for specified StatDefinition on specified GameItem. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If the gameItemId is null or empty. |
| InventoryItemNotFoundException | If the gameItemId is not found. |
GetValue(string, string)
Gets specified StatDefinition from specified GameItem.
Declaration
public static StatValue GetValue(string gameItemId, string statDefinitionId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | gameItemId | GameItem upon which StatManager is to get the stat. |
| string | statDefinitionId | Id of StatDefinition this method is to act upon. |
Returns
| Type | Description |
|---|---|
| StatValue | StatValue for specified StatDefinition on specified GameItem. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If the gameItemId is null or empty. |
| InventoryItemNotFoundException | If the gameItemId is not found. |
| ArgumentException | If the statDefinitionId is null or empty. |
| StatDefinitionNotFoundException | If the StatDefinition is not found. |