Skip to main content

ProjectVCharacterUpgradeRequirements class

What a character's next level needs and gives, as the server sets it. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterUpgradeRequirements

Constructors​

ProjectVCharacterUpgradeRequirements(int maxLevel, bool isMaxLevel, long requiredExperience, IReadOnlyList<ProjectVCharacterCost> costs, int nextLevel, ProjectVCharacterStats? nextStats)​

Creates upgrade requirements, for example in tests.

public ProjectVCharacterUpgradeRequirements(int maxLevel, bool isMaxLevel, long requiredExperience, IReadOnlyList<ProjectVCharacterCost> costs, int nextLevel = 0, ProjectVCharacterStats? nextStats = null);

Parameters

NameTypeDescription
maxLevelintThe character's maximum level; 1 or more.
isMaxLevelboolTrue when the character is already at its maximum level.
requiredExperiencelongThe total EXP the next level needs; 0 or more, and 0 at the maximum level.
costsIReadOnlyList<ProjectVCharacterCost>The price of the next level; each resource at most once, and empty at the maximum level.
nextLevelintThe next level; from 0 to maxLevel.
nextStatsProjectVCharacterStats?The stats at the next level, or null when unknown.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionmaxLevel is below 1, requiredExperience is negative, or nextLevel is out of range.
ArgumentNullExceptioncosts is null.
ArgumentExceptioncosts contains null or the same resource twice, or a maximum-level entry has EXP or costs.

Properties​

PropertyTypeDescription
MaxLevelintThe character's maximum level.
IsMaxLevelboolTrue when the character is at its maximum level.
RequiredExperiencelongThe total EXP, counted from level 1, the next level needs; compare it with ProjectVCharacterEntry.Experience. 0 at the maximum level.
CostsIReadOnlyList<ProjectVCharacterCost>The wallet price of the next level; empty at the maximum level.
NextLevelintThe next level; 0 when the server did not say.
NextStatsProjectVCharacterStats?The stats at the next level, for a before/after panel; null when unknown.