Method AdjustStatFloat
AdjustStatFloat(string, float)
Adjusts the float Stat with corresponding statDefinitionId by specified amount.
Declaration
public float AdjustStatFloat(string statDefinitionId, float change)
Parameters
| Type | Name | Description |
|---|---|---|
| string | statDefinitionId | Stat statDefinitionId to adjust. |
| float | change | Change in value to the Stat. |
Returns
| Type | Description |
|---|---|
| float | The new value of Stat on this GameItem. |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | The parameter doesn't exist in the stats catalog. |
| InvalidOperationException | The parameter refers to a stat of a different type. |
| ArgumentNullException | The stat parameter is null or empty. |
AdjustStatFloat(int, float)
Sets the float Stat with corresponding statDefinitionHash by specified amount.
Declaration
public float AdjustStatFloat(int statDefinitionHash, float change)
Parameters
| Type | Name | Description |
|---|---|---|
| int | statDefinitionHash | Stat statDefinitionHash to adjust. |
| float | change | Change in value to the Stat. |
Returns
| Type | Description |
|---|---|
| float | The new value of Stat on this GameItem. |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | The parameter doesn't exist in the stats catalog. |
| InvalidOperationException | The parameter refers to a stat of a different type. |