Method AdjustValue
AdjustValue(GameItem, StatDefinition, StatValue)
Adjusts specified StatDefinition on specified gameItem by specified amount.
Declaration
public static StatValue AdjustValue(GameItem gameItem, StatDefinition statDefinition, StatValue change)
Parameters
Type | Name | Description |
---|---|---|
GameItem | gameItem | GameItem upon which Stat is to be adjusted. |
StatDefinition | statDefinition | StatDefinition this method is to act upon. |
StatValue | change | Adjustment (positive or negative) to Stat. |
Returns
Type | Description |
---|---|
StatValue | The new value of Stat on GameItem. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If the gameItem argument is null. |
ArgumentNullException | If the statDefinition argument is null. |
Exception | If the statDefinition not found on game item. |
InvalidCastException | If the StatValueType doesn't match StatDefinition. |
DetailNotFoundException | If the StatDetail is not found on GameItem. |
StatDefinitionNotFoundException | If the StatDefinition is not found. |
AdjustValue(GameItem, string, StatValue)
Adjusts specified StatDefinition on specified gameItem by specified amount.
Declaration
public static StatValue AdjustValue(GameItem gameItem, string statDefinitionId, StatValue change)
Parameters
Type | Name | Description |
---|---|---|
GameItem | gameItem | GameItem upon which Stat is to be adjusted. |
string | statDefinitionId | Id of StatDefinition this method is to act upon. |
StatValue | change | Adjustment (positive or negative) to Stat. |
Returns
Type | Description |
---|---|
StatValue | The new value of Stat on GameItem. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If the gameItem argument is null. |
ArgumentException | If the statDefinitionId is null or empty. |
DetailNotFoundException | If the StatDetail is not found on GameItem. |
StatDefinitionNotFoundException | If the StatDefinition is not found. |
Exception | If the statDefinition not found on game item. |
StatDefinitionNotFoundException | If the StatDefinition is not found. |