Method AdjustStat
AdjustStat(string, StatValue)
Adjusts the value of the StatDefinition by its given
statDefinitionId
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 StatDefinition to adjust. |
StatValue | change | Change to apply to the current value of the stat. |
Returns
Type | Description |
---|---|
StatValue | The new value of the stat. |
Exceptions
Type | Condition |
---|---|
NullReferenceException | If this GameItem instance has been discarded. |
ArgumentException | If the
|
InvalidOperationException | The parameter refers to a stat of a different type. |
ArgumentNullException | The
|
AdjustStat(StatDefinition, StatValue)
Adjusts the stat by specified amount.
Declaration
public StatValue AdjustStat(StatDefinition statDefinition, StatValue change)
Parameters
Type | Name | Description |
---|---|---|
StatDefinition | statDefinition | The stat to adjust. |
StatValue | change | Change in value to the Stat. |
Returns
Type | Description |
---|---|
StatValue | The new value of Stat on this GameItem. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The parameter refers to a stat of a different type. |
ArgumentNullException | The parameter is null or empty. |