ProjectVCharacterEquipment class
One piece of equipment from the catalog, owned or not: its slot, level and next upgrade price. Read-only.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Character
public sealed class ProjectVCharacterEquipment
Constructors​
ProjectVCharacterEquipment(ProjectVEquipmentId id, ProjectVEquipmentSlotId slot, long level, long maxLevel, bool owned, bool equipped, IReadOnlyList<ProjectVCharacterCost> upgradeCosts)​
Creates an equipment entry, for example in tests.
public ProjectVCharacterEquipment(ProjectVEquipmentId id, ProjectVEquipmentSlotId slot, long level, long maxLevel, bool owned, bool equipped, IReadOnlyList<ProjectVCharacterCost> upgradeCosts);
Parameters
| Name | Type | Description |
|---|---|---|
id | ProjectVEquipmentId | The equipment's ID. |
slot | ProjectVEquipmentSlotId | The slot it goes in. |
level | long | The current level; 1 or more (1 when not owned). |
maxLevel | long | The highest level; at least level. |
owned | bool | True when the player owns it. |
equipped | bool | True when it is equipped. |
upgradeCosts | IReadOnlyList<ProjectVCharacterCost> | The price of the next level; empty when it cannot be upgraded. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | level is below 1 or maxLevel is below level. |
ArgumentNullException | upgradeCosts is null. |
Properties​
| Property | Type | Description |
|---|---|---|
Id | ProjectVEquipmentId | The equipment's ID. |
Slot | ProjectVEquipmentSlotId | The slot this equipment goes in, such as the primary weapon slot. |
Level | long | The current level; 1 when the player does not own it. |
MaxLevel | long | The highest level this equipment can reach. |
Owned | bool | True when the player owns this equipment. Show unowned entries as locked. |
Equipped | bool | True when this equipment is equipped. |
UpgradeCosts | IReadOnlyList<ProjectVCharacterCost> | The price of the next level; empty when it is not owned or already at its maximum level. |