ProjectVCharacterEntry class
One owned character or ally: level, EXP, stats and what its next level needs. Read-only.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Character
public sealed class ProjectVCharacterEntry
Constructors​
ProjectVCharacterEntry(ProjectVCharacterId id, ProjectVCharacterKind kind, long level, long experience, ProjectVCharacterStats stats)​
Creates an entry without upgrade data, for example in tests.
public ProjectVCharacterEntry(ProjectVCharacterId id, ProjectVCharacterKind kind, long level, long experience, ProjectVCharacterStats stats);
Parameters
| Name | Type | Description |
|---|---|---|
id | ProjectVCharacterId | The character's ID. |
kind | ProjectVCharacterKind | Character or ally; see ProjectVCharacterKinds. |
level | long | The current level; 1 or more. |
experience | long | The character's total EXP; 0 or more. |
stats | ProjectVCharacterStats | The stats at the current level. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | level is below 1 or experience is negative. |
ArgumentNullException | stats is null. |
ProjectVCharacterEntry(ProjectVCharacterId id, ProjectVCharacterKind kind, long level, long experience, ProjectVCharacterStats stats, ProjectVCharacterUpgradeRequirements? upgrade, IReadOnlyList<ProjectVCharacterLevelStep>? levelPath, ProjectVCharacterLevelResetRequirements? levelReset)​
Creates an entry, for example in tests. The SDK builds these for you from server data.
public ProjectVCharacterEntry(ProjectVCharacterId id, ProjectVCharacterKind kind, long level, long experience, ProjectVCharacterStats stats, ProjectVCharacterUpgradeRequirements? upgrade, IReadOnlyList<ProjectVCharacterLevelStep>? levelPath = null, ProjectVCharacterLevelResetRequirements? levelReset = null);
Parameters
| Name | Type | Description |
|---|---|---|
id | ProjectVCharacterId | The character's ID. |
kind | ProjectVCharacterKind | Character or ally; see ProjectVCharacterKinds. |
level | long | The current level; 1 or more. |
experience | long | The character's total EXP; 0 or more. |
stats | ProjectVCharacterStats | The stats at the current level. |
upgrade | ProjectVCharacterUpgradeRequirements? | What the next level needs, or null when the server sent no requirements. |
levelPath | IReadOnlyList<ProjectVCharacterLevelStep>? | Every level from 1 to the maximum, in order; null or empty when unknown. |
levelReset | ProjectVCharacterLevelResetRequirements? | Whether the level can be reset and what it refunds; null when unknown. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | level is below 1 or experience is negative. |
ArgumentNullException | stats is null. |
ArgumentException | levelPath has more than 4096 steps or a null step, is not numbered 1, 2, 3 …, or its EXP goes down. |
Properties​
| Property | Type | Description |
|---|---|---|
Id | ProjectVCharacterId | The character's ID. Pass Id.Value to the screen commands. |
Kind | ProjectVCharacterKind | Whether this is a playable character or an ally; compare with ProjectVCharacterKinds. |
Level | long | The current level, starting at 1. |
Experience | long | The character's total EXP, counted from level 1. |
Stats | ProjectVCharacterStats | The stats at the current level. |
Upgrade | ProjectVCharacterUpgradeRequirements? | What the next level needs and gives; null when the server sent no requirements, so hide Level Up. |
LevelPath | IReadOnlyList<ProjectVCharacterLevelStep> | Every level from 1 to the maximum, with its total EXP and stats, for level previews. Empty when the server did not send it. |
LevelReset | ProjectVCharacterLevelResetRequirements? | Whether the level can be reset and which EXP items it refunds; null when unknown. |