Chuyển tới nội dung chính

ProjectVCharacterSnapshot class

The Character presenter's state at one moment. Read-only; every change is a new snapshot.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterSnapshot

Properties​

PropertyTypeDescription
StatusProjectVCharacterStatusWhat the presenter is doing.
DataProjectVCharacterData?The last confirmed data; null before the first load. Kept when a later command fails.
RecoveryProjectVScreenRecoveryStateOffline, cached and retry hints for the screen, with a message to show.
ErrorProjectVCharacterError?Why the last load or command failed, or null.
HasUsableDataboolTrue when there is data to draw, even if the last command failed.
IsReadyboolTrue when the data is loaded and no command is running.
RequiresUpgradeSyncboolTrue after a level-up or other progression change whose result is not confirmed. Balances and requirements may be out of date: sync before offering another upgrade.
ConfirmedProgressionOutcomeProjectVCharacterProgressionOutcomeWhat the server confirmed during the last command, even when the command as a whole reported a failure (for example EXP applied but the screen data could not be refreshed). None otherwise.

Methods​

GetUpgradeState(ProjectVCharacterId characterId)​

Works out whether a character can level up now, and if not, why.

public ProjectVCharacterUpgradeState GetUpgradeState(ProjectVCharacterId characterId);

Parameters

NameTypeDescription
characterIdProjectVCharacterIdThe character to check.

Returns

ProjectVCharacterUpgradeState: The upgrade state; never null. ProjectVCharacterUpgradeState.CanUpgrade is true when Level Up can be offered, otherwise ProjectVCharacterUpgradeState.Message says why not.