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

ProjectVAllyView class

One ally the player owns, as the Alliance screen draws it. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Alliance

public sealed class ProjectVAllyView

Properties​

PropertyTypeDescription
IdstringThe ally's ID; pass it to the IProjectVAllianceScreen commands.
LevellongThe ally's current level.
ExperiencelongThe ally's current EXP.
StatsProjectVCharacterStatsThe ally's stats at the current level.
UpgradeProjectVCharacterUpgradeRequirements?What the next level needs and gives, or null when that is not known.
IsMaxLevelboolTrue when the ally cannot level up further, or when its next level is not known.
HasPendingUpgradeboolThis ally's upgrade awaits confirmation; LevelUpAsync finishes it.
IsBlockedByPendingUpgradeboolAnother ally's upgrade awaits confirmation, so this ally's level cannot change yet.
WeaponSkillProjectVCharacterCastSkillUpgradeDetailsThe next weapon skill upgrade: cost, effect and whether it can be bought now.
LevelResetProjectVCharacterLevelResetPreviewWhat resetting the ally to level 1 would refund, and whether the reset is possible now.

Methods​

PreviewXp(IReadOnlyList<ProjectVCharacterXpItemSelection> items)​

What leveling with these EXP items would do. An empty selection previews the current level.

public ProjectVCharacterXpUpgradePreview PreviewXp(IReadOnlyList<ProjectVCharacterXpItemSelection> items);

Parameters

NameTypeDescription
itemsIReadOnlyList<ProjectVCharacterXpItemSelection>The EXP items and quantities to preview; may be empty.

Returns

ProjectVCharacterXpUpgradePreview: The preview with the EXP gained and the resulting level. CanSubmit is false, with a Message to show, when the selection cannot be used or another ally has an upgrade pending.

Exceptions

ExceptionWhen
ArgumentNullExceptionitems is null.

XpForNextLevel()​

The fewest EXP items that reach the next level.

public IReadOnlyList<ProjectVCharacterXpItemSelection> XpForNextLevel();

Returns

IReadOnlyList<ProjectVCharacterXpItemSelection>: The items to pass to IProjectVAllianceScreen.LevelUpAsync; empty when the player cannot reach it or another ally has an upgrade pending.

XpForMaximumLevel()​

EXP items that reach the highest level the player can afford.

public IReadOnlyList<ProjectVCharacterXpItemSelection> XpForMaximumLevel();

Returns

IReadOnlyList<ProjectVCharacterXpItemSelection>: The items to pass to IProjectVAllianceScreen.LevelUpAsync; empty when no level is reachable or another ally has an upgrade pending.