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

ProjectVCharacterXpItemDefinition class

One kind of EXP item: how much EXP it gives and whether it is for characters or allies. Read-only.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Character

public sealed class ProjectVCharacterXpItemDefinition

Constructors​

ProjectVCharacterXpItemDefinition(string itemId, long experience, string characterKind, long sortOrder)​

Creates an EXP item definition, for example in tests.

public ProjectVCharacterXpItemDefinition(string itemId, long experience, string characterKind = "character", long sortOrder = 0);

Parameters

NameTypeDescription
itemIdstringThe item ID; not empty, at most 128 UTF-8 bytes.
experiencelongThe EXP one item gives; 1 or more.
characterKindstringcharacter or ally: who the item can level.
sortOrderlongWhere the item goes in lists, lowest first; 0 or more.

Exceptions

ExceptionWhen
ArgumentExceptionitemId is empty or too long, or characterKind is not character or ally.
ArgumentOutOfRangeExceptionexperience is below 1 or sortOrder is negative.

Properties​

PropertyTypeDescription
ItemIdstringThe item ID; look up the owned amount in ProjectVCharacterData.Inventory.
ExperiencelongThe EXP one item gives.
CharacterKindstringcharacter or ally: who the item can level.
SortOrderlongWhere the item goes in lists, lowest first.