Skip to main content

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

NameTypeDescription
idProjectVCharacterSkillIdThe skill's ID.
ranklongThe current rank; from 0 to maxRank.
maxRanklongThe highest rank; 1 or more.
stateProjectVCharacterSkillStateWhether the next rank can be bought.
requiredCharacterLevellongThe character level the next rank needs; 0 or more.
costsIReadOnlyList<ProjectVCharacterCost>The price of the next rank; empty when free.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionA number is out of range, or state is not a defined value.
ArgumentNullExceptioncosts is null.
ArgumentExceptioncosts 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

NameTypeDescription
idProjectVCharacterSkillIdThe skill's ID.
ranklongThe current rank; from 0 to maxRank.
maxRanklongThe highest rank; 1 or more.
stateProjectVCharacterSkillStateWhether the next rank can be bought.
requiredCharacterLevellongThe character level the next rank needs; 0 or more.
costsIReadOnlyList<ProjectVCharacterCost>The price of the next rank; empty when free.
prerequisitesIReadOnlyList<ProjectVCharacterSkillPrerequisite>Other skills that must reach a rank first; may be empty.
lockReasonsIReadOnlyList<ProjectVCharacterSkillLockReason>Why the next rank is blocked; empty when it is not.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionA number is out of range, or state is not a defined value.
ArgumentNullExceptionA list is null.
ArgumentExceptionA list contains null or an undefined lock reason.

Properties​

PropertyTypeDescription
IdProjectVCharacterSkillIdThe skill's ID. Pass Id.Value to IProjectVCharacterScreen.UpgradeSkillAsync.
RanklongThe current rank; 0 means not learned yet.
MaxRanklongThe highest rank this skill can reach.
StateProjectVCharacterSkillStateWhether the next rank can be bought, as the server reports it.
RequiredCharacterLevellongThe character level the next rank needs; 0 when there is no level requirement.
CostsIReadOnlyList<ProjectVCharacterCost>The price of the next rank; empty when it is free.
PrerequisitesIReadOnlyList<ProjectVCharacterSkillPrerequisite>Other skills that must reach a rank before this one can rank up.
LockReasonsIReadOnlyList<ProjectVCharacterSkillLockReason>Why the next rank is blocked; empty when nothing blocks it.