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 |
---|---|
Null |
The parameter doesn't exist in the stats catalog. |
Invalid |
The parameter refers to a stat of a different type. |
Argument |
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 |
---|---|
Null |
The parameter doesn't exist in the stats catalog. |
Invalid |
The parameter refers to a stat of a different type. |