ProjectVCharacterView class
Everything the Character screen draws. It is immutable and always complete: values come from the last confirmed data, never from an in-flight request.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Character
public sealed class ProjectVCharacterView
Properties
| Property | Type | Description |
|---|---|---|
IsLoading | bool | True only until the first data arrives. |
LoadError | string? | Why the first load failed, for a retry prompt; null otherwise. |
Data | ProjectVCharacterData? | The roster, loadout, skills, inventory and balances; null while loading. |
PendingUpgrade | ProjectVCharacterProgressionPending? | A level-up or level reset whose answer was lost, or null. While it is set, IProjectVCharacterScreen.LevelUpAsync finishes it before anything new. |
Methods
UpgradeState(string characterId)
Requirements, balances and block reason for leveling this character.
public ProjectVCharacterUpgradeState? UpgradeState(string characterId);
Parameters
| Name | Type | Description |
|---|---|---|
characterId | string | The character's ID, as in Id.Value. |
Returns
ProjectVCharacterUpgradeState?: The upgrade state, or null while loading. ProjectVCharacterUpgradeState.CanUpgrade says whether Level Up can be offered; ProjectVCharacterUpgradeState.Message says why not.
Exceptions
| Exception | When |
|---|---|
ArgumentException | characterId is null, empty or whitespace and data is loaded. |
PreviewXp(string characterId, IReadOnlyList<ProjectVCharacterXpItemSelection> items)
What leveling with these EXP items would do; null while loading.
public ProjectVCharacterXpUpgradePreview? PreviewXp(string characterId, IReadOnlyList<ProjectVCharacterXpItemSelection> items);
Parameters
| Name | Type | Description |
|---|---|---|
characterId | string | The character's ID, as in Id.Value. |
items | IReadOnlyList<ProjectVCharacterXpItemSelection> | The EXP items and quantities to spend; may be empty. |
Returns
ProjectVCharacterXpUpgradePreview?: The preview, or null while loading. ProjectVCharacterXpUpgradePreview.CanSubmit says whether IProjectVCharacterScreen.LevelUpAsync can be called; it is false while a level-up is pending.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException | items is null. |
ArgumentException | characterId is null, empty or whitespace, data is loaded and no level-up is pending. |