ProjectVCharacterSkill class
One node of a character's skill tree: its rank, price and what still blocks it. Read-only.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Character
public sealed class ProjectVCharacterSkill
Constructors
ProjectVCharacterSkill(ProjectVCharacterSkillId id, long rank, long maxRank, ProjectVCharacterSkillState state, long requiredCharacterLevel, IReadOnlyList<ProjectVCharacterCost> costs)
Creates a skill without prerequisites or lock reasons, for example in tests.
public ProjectVCharacterSkill(ProjectVCharacterSkillId id, long rank, long maxRank, ProjectVCharacterSkillState state, long requiredCharacterLevel, IReadOnlyList<ProjectVCharacterCost> costs);
Parameters
| Name | Type | Description |
|---|---|---|
id | ProjectVCharacterSkillId | The skill's ID. |
rank | long | The current rank; from 0 to maxRank. |
maxRank | long | The highest rank; 1 or more. |
state | ProjectVCharacterSkillState | Whether the next rank can be bought. |
requiredCharacterLevel | long | The character level the next rank needs; 0 or more. |
costs | IReadOnlyList<ProjectVCharacterCost> | The price of the next rank; empty when free. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | A number is out of range, or state is not a defined value. |
ArgumentNullException | costs is null. |
ArgumentException | costs contains null. |
ProjectVCharacterSkill(ProjectVCharacterSkillId id, long rank, long maxRank, ProjectVCharacterSkillState state, long requiredCharacterLevel, IReadOnlyList<ProjectVCharacterCost> costs, IReadOnlyList<ProjectVCharacterSkillPrerequisite> prerequisites, IReadOnlyList<ProjectVCharacterSkillLockReason> lockReasons)
Creates a skill, for example in tests. The SDK builds these for you from server data.
public ProjectVCharacterSkill(ProjectVCharacterSkillId id, long rank, long maxRank, ProjectVCharacterSkillState state, long requiredCharacterLevel, IReadOnlyList<ProjectVCharacterCost> costs, IReadOnlyList<ProjectVCharacterSkillPrerequisite> prerequisites, IReadOnlyList<ProjectVCharacterSkillLockReason> lockReasons);
Parameters
| Name | Type | Description |
|---|---|---|
id | ProjectVCharacterSkillId | The skill's ID. |
rank | long | The current rank; from 0 to maxRank. |
maxRank | long | The highest rank; 1 or more. |
state | ProjectVCharacterSkillState | Whether the next rank can be bought. |
requiredCharacterLevel | long | The character level the next rank needs; 0 or more. |
costs | IReadOnlyList<ProjectVCharacterCost> | The price of the next rank; empty when free. |
prerequisites | IReadOnlyList<ProjectVCharacterSkillPrerequisite> | Other skills that must reach a rank first; may be empty. |
lockReasons | IReadOnlyList<ProjectVCharacterSkillLockReason> | Why the next rank is blocked; empty when it is not. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | A number is out of range, or state is not a defined value. |
ArgumentNullException | A list is null. |
ArgumentException | A list contains null or an undefined lock reason. |
Properties
| Property | Type | Description |
|---|---|---|
Id | ProjectVCharacterSkillId | The skill's ID. Pass Id.Value to IProjectVCharacterScreen.UpgradeSkillAsync. |
Rank | long | The current rank; 0 means not learned yet. |
MaxRank | long | The highest rank this skill can reach. |
State | ProjectVCharacterSkillState | Whether the next rank can be bought, as the server reports it. |
RequiredCharacterLevel | long | The character level the next rank needs; 0 when there is no level requirement. |
Costs | IReadOnlyList<ProjectVCharacterCost> | The price of the next rank; empty when it is free. |
Prerequisites | IReadOnlyList<ProjectVCharacterSkillPrerequisite> | Other skills that must reach a rank before this one can rank up. |
LockReasons | IReadOnlyList<ProjectVCharacterSkillLockReason> | Why the next rank is blocked; empty when nothing blocks it. |