Method AdjustStat
AdjustStat(string, StatValue)
Adjusts the value of the StatstatDefinitionId
by adding the
change
to its current value.
Declaration
public StatValue AdjustStat(string statDefinitionId, StatValue change)
Parameters
Type | Name | Description |
---|---|---|
string | statDefinitionId | Identifier of the
Stat |
Stat |
change | Change to apply to the current value of the stat. |
Returns
Type | Description |
---|---|
Stat |
The new value of the stat. |
Exceptions
Type | Condition |
---|---|
Null |
If this
Game |
Argument |
If the
|
Invalid |
The parameter refers to a stat of a different type. |
Argument |
The
|
AdjustStat(StatDefinition, StatValue)
Adjusts the stat by specified amount.
Declaration
public StatValue AdjustStat(StatDefinition statDefinition, StatValue change)
Parameters
Type | Name | Description |
---|---|---|
Stat |
statDefinition | The stat to adjust. |
Stat |
change | Change in value to the Stat. |
Returns
Type | Description |
---|---|
Stat |
The new value of Stat on this GameItem. |
Exceptions
Type | Condition |
---|---|
Invalid |
The parameter refers to a stat of a different type. |
Argument |
The parameter is null or empty. |