Skip to main content

ProjectVCharacterCastSkill class

One cast skill of a character: its level, the skill it unlocks next and the price. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterCastSkill

Constructors​

ProjectVCharacterCastSkill(ProjectVCharacterCastSkillSlot slot, long level, long maxLevel, ProjectVGameplaySkillId currentSkillId, ProjectVGameplaySkillId? nextSkillId, ProjectVCharacterCastSkillState state, IReadOnlyList<ProjectVCharacterCastSkillCost> costs, IReadOnlyList<ProjectVCharacterCastSkillLockReason> lockReasons)​

Creates a cast skill, for example in tests. The SDK builds these for you from server data.

public ProjectVCharacterCastSkill(ProjectVCharacterCastSkillSlot slot, long level, long maxLevel, ProjectVGameplaySkillId currentSkillId, ProjectVGameplaySkillId? nextSkillId, ProjectVCharacterCastSkillState state, IReadOnlyList<ProjectVCharacterCastSkillCost> costs, IReadOnlyList<ProjectVCharacterCastSkillLockReason> lockReasons);

Parameters

NameTypeDescription
slotProjectVCharacterCastSkillSlotThe slot the skill sits in.
levellongThe current level; 1 or more.
maxLevellongThe highest level; at least level.
currentSkillIdProjectVGameplaySkillIdThe gameplay skill used at the current level.
nextSkillIdProjectVGameplaySkillId?The gameplay skill the next level gives, or null at the maximum level.
stateProjectVCharacterCastSkillStateWhether the next level can be bought.
costsIReadOnlyList<ProjectVCharacterCastSkillCost>The price of the next level; each resource at most once.
lockReasonsIReadOnlyList<ProjectVCharacterCastSkillLockReason>Why the next level is blocked; empty when it is not.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionAn enum value is undefined or a level is out of range.
ArgumentNullExceptioncosts or lockReasons is null.
ArgumentExceptionA skill ID is empty, or a list contains null, the same resource twice or an undefined lock reason.

Properties​

PropertyTypeDescription
SlotProjectVCharacterCastSkillSlotThe slot the skill sits in. Pass it to IProjectVCharacterScreen.UpgradeCastSkillAsync.
LevellongThe current level, starting at 1.
MaxLevellongThe highest level this skill can reach.
CurrentSkillIdProjectVGameplaySkillIdThe gameplay skill used at the current level.
NextSkillIdProjectVGameplaySkillId?The gameplay skill the next level gives; null at the maximum level.
StateProjectVCharacterCastSkillStateWhether the next level can be bought, as the server reports it.
CostsIReadOnlyList<ProjectVCharacterCastSkillCost>The price of the next level.
LockReasonsIReadOnlyList<ProjectVCharacterCastSkillLockReason>Why the next level is blocked; empty when nothing blocks it.