Skip to main content

ProjectVCharacterXpUpgradePreview class

What leveling a character with a set of EXP items would do: whether it can be sent, the EXP gained, and the level and stats it would reach. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterXpUpgradePreview

Constructors​

ProjectVCharacterXpUpgradePreview(bool canSubmit, string message, long grantedExperience, long projectedExperience)​

Creates a preview with only the basic values, for example in tests. Level fields stay 0.

public ProjectVCharacterXpUpgradePreview(bool canSubmit, string message, long grantedExperience, long projectedExperience);

Parameters

NameTypeDescription
canSubmitboolTrue when the level-up can be sent.
messagestringText to show.
grantedExperiencelongThe EXP the selected items give.
projectedExperiencelongThe character's total EXP after the items.

Properties​

PropertyTypeDescription
CanSubmitboolTrue when the Level Up button can be enabled. Also true when the items add EXP but not enough for a level yet: the EXP is kept.
MessagestringText to show: what will happen, or why it cannot be sent.
GrantedExperiencelongThe EXP the selected items give.
ProjectedExperiencelongThe character's total EXP after the selected items.
CurrentExperiencelongThe character's total EXP now.
CurrentLevelintThe character's level now; 0 when the character is not found.
TargetLevelintThe highest level ProjectedExperience reaches; equals CurrentLevel when no level is gained.
MaxLevelintThe character's maximum level.
AvailableLevelCountintHow many levels the EXP reaches: TargetLevel minus CurrentLevel. The wallet may still limit it.
CurrentLevelExperiencelongEXP earned inside the current level, for the current EXP bar.
CurrentLevelRequiredExperiencelongEXP the current level needs in total to reach the next one; 0 at the maximum level.
TargetLevelExperiencelongEXP inside the target level after the items, for the preview EXP bar.
TargetLevelRequiredExperiencelongEXP the target level needs in total to reach the next one; 0 at the maximum level.
RemainingExperiencelongThe EXP left over inside the target level; same as TargetLevelExperience.
CurrentStatsProjectVCharacterStats?The stats now; null when the character is not found.
TargetStatsProjectVCharacterStats?The stats at TargetLevel; same as CurrentStats when no level is gained.