Method SetValue
SetValue(GameItem, StatDefinition, StatValue)
Sets specified StatDefinition on specified GameItem to a specific value.
Declaration
public static void SetValue(GameItem gameItem, StatDefinition statDefinition, StatValue value)
Parameters
Type | Name | Description |
---|---|---|
Game |
gameItem | |
Stat |
statDefinition | StatDefinition this method is to act upon. |
Stat |
value | New value of Stat to set for this GameItem. |
Exceptions
Type | Condition |
---|---|
Argument |
If the gameItem argument is null. |
Argument |
If the statDefinition argument is null. |
Invalid |
If the StatValueType doesn't match StatDefinition. |
Detail |
If the StatDetail is not found on GameItem. |
Stat |
If the StatDefinition is not found. |
SetValue(GameItem, string, StatValue)
Sets specified StatDefinition on specified GameItem to a specific value.
Declaration
public static void SetValue(GameItem gameItem, string statDefinitionId, StatValue value)
Parameters
Type | Name | Description |
---|---|---|
Game |
gameItem | GameItem upon which Stat is to be set. |
string | statDefinitionId | Id of StatDefinition this method is to act upon. |
Stat |
value | New value of Stat to set for this GameItem. |
Exceptions
Type | Condition |
---|---|
Argument |
If the gameItem argument is null. |
Argument |
If the statDefinitionId is null or empty. |
Invalid |
If the StatValueType doesn't match StatDefinition. |
Detail |
If the StatDetail is not found on GameItem. |
Stat |
If the StatDefinition is not found. |
SetValue(string, StatDefinition, StatValue)
Sets specified StatDefinition on specified GameItem to a specific value.
Declaration
public static void SetValue(string gameItemId, StatDefinition statDefinition, StatValue value)
Parameters
Type | Name | Description |
---|---|---|
string | gameItemId | GameItem upon which StatManager is to set the stat. |
Stat |
statDefinition | StatDefinition this method is to act upon. |
Stat |
value | New value of Stat to set for this GameItem. |
Exceptions
Type | Condition |
---|---|
Argument |
If the statDefinition argument is null. |
Argument |
If the gameItemId is null or empty. |
Inventory |
If the gameItemId is not found. |
Invalid |
If the StatValueType doesn't match StatDefinition. |
Detail |
If the StatDetail is not found on GameItem. |
Stat |
If the StatDefinition is not found. |
SetValue(string, string, StatValue)
Sets specified StatDefinition on specified GameItem to a specific value.
Declaration
public static void SetValue(string gameItemId, string statDefinitionId, StatValue value)
Parameters
Type | Name | Description |
---|---|---|
string | gameItemId | GameItem upon which StatManager is to set the stat. |
string | statDefinitionId | Id of StatDefinition this method is to act upon. |
Stat |
value | New value of Stat to set for this GameItem. |
Exceptions
Type | Condition |
---|---|
Argument |
If the gameItemId is null or empty. |
Inventory |
If the gameItemId is not found. |
Argument |
If the statDefinitionId is null or empty. |
Stat |
If the StatDefinition is not found. |
Invalid |
If the StatValueType doesn't match StatDefinition. |
Detail |
If the StatDetail is not found on GameItem. |