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
| Name | Type | Description |
|---|---|---|
maxLevel | int | The character's maximum level; 1 or more. |
isMaxLevel | bool | True when the character is already at its maximum level. |
requiredExperience | long | The total EXP the next level needs; 0 or more, and 0 at the maximum level. |
costs | IReadOnlyList<ProjectVCharacterCost> | The price of the next level; each resource at most once, and empty at the maximum level. |
nextLevel | int | The next level; from 0 to maxLevel. |
nextStats | ProjectVCharacterStats? | The stats at the next level, or null when unknown. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | maxLevel is below 1, requiredExperience is negative, or nextLevel is out of range. |
ArgumentNullException | costs is null. |
ArgumentException | costs contains null or the same resource twice, or a maximum-level entry has EXP or costs. |
Properties​
| Property | Type | Description |
|---|---|---|
MaxLevel | int | The character's maximum level. |
IsMaxLevel | bool | True when the character is at its maximum level. |
RequiredExperience | long | The total EXP, counted from level 1, the next level needs; compare it with ProjectVCharacterEntry.Experience. 0 at the maximum level. |
Costs | IReadOnlyList<ProjectVCharacterCost> | The wallet price of the next level; empty at the maximum level. |
NextLevel | int | The next level; 0 when the server did not say. |
NextStats | ProjectVCharacterStats? | The stats at the next level, for a before/after panel; null when unknown. |