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
| Name | Type | Description |
|---|---|---|
slot | ProjectVCharacterCastSkillSlot | The slot the skill sits in. |
level | long | The current level; 1 or more. |
maxLevel | long | The highest level; at least level. |
currentSkillId | ProjectVGameplaySkillId | The gameplay skill used at the current level. |
nextSkillId | ProjectVGameplaySkillId? | The gameplay skill the next level gives, or null at the maximum level. |
state | ProjectVCharacterCastSkillState | Whether the next level can be bought. |
costs | IReadOnlyList<ProjectVCharacterCastSkillCost> | The price of the next level; each resource at most once. |
lockReasons | IReadOnlyList<ProjectVCharacterCastSkillLockReason> | Why the next level is blocked; empty when it is not. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | An enum value is undefined or a level is out of range. |
ArgumentNullException | costs or lockReasons is null. |
ArgumentException | A skill ID is empty, or a list contains null, the same resource twice or an undefined lock reason. |
Properties
| Property | Type | Description |
|---|---|---|
Slot | ProjectVCharacterCastSkillSlot | The slot the skill sits in. Pass it to IProjectVCharacterScreen.UpgradeCastSkillAsync. |
Level | long | The current level, starting at 1. |
MaxLevel | long | The highest level this skill can reach. |
CurrentSkillId | ProjectVGameplaySkillId | The gameplay skill used at the current level. |
NextSkillId | ProjectVGameplaySkillId? | The gameplay skill the next level gives; null at the maximum level. |
State | ProjectVCharacterCastSkillState | Whether the next level can be bought, as the server reports it. |
Costs | IReadOnlyList<ProjectVCharacterCastSkillCost> | The price of the next level. |
LockReasons | IReadOnlyList<ProjectVCharacterCastSkillLockReason> | Why the next level is blocked; empty when nothing blocks it. |