|
1 | 1 | --- @meta _ |
| 2 | +--- @diagnostic disable: duplicate-doc-field, duplicate-doc-alias |
2 | 3 | -- this file contains some of the type definitions used in this library |
3 | 4 |
|
4 | | ----@class treeCurrencyInfo |
5 | | ----@field traitCurrencyID number |
6 | | ----@field quantity number |
7 | | ----@field maxQuantity number? |
8 | | ----@field spent number |
9 | | ----@field isClassCurrency boolean? # true if the currency is a class currency, nil otherwise |
10 | | ----@field isSpecCurrency boolean? # true if the currency is a spec currency, nil otherwise |
11 | | ----@field subTreeID number? # DEPRECATED the sub tree ID that the currency is associated with if any, nil otherwise |
12 | | ----@field subTreeIDs number[]? # list of sub trees that the currency is associated with if any, nil otherwise |
| 5 | +--- @class treeCurrencyInfo: TreeCurrencyInfo |
| 6 | +--- @field traitCurrencyID number |
| 7 | +--- @field quantity number |
| 8 | +--- @field maxQuantity number? |
| 9 | +--- @field spent number |
| 10 | +--- @field isClassCurrency boolean? # true if the currency is a class currency, nil otherwise |
| 11 | +--- @field isSpecCurrency boolean? # true if the currency is a spec currency, nil otherwise |
| 12 | +--- @field subTreeID number? # DEPRECATED the sub tree ID that the currency is associated with if any, nil otherwise |
| 13 | +--- @field subTreeIDs number[]? # list of sub trees that the currency is associated with if any, nil otherwise |
13 | 14 |
|
14 | | ----@alias edgeType |
15 | | ----| 0 # VisualOnly |
16 | | ----| 1 # DeprecatedRankConnection |
17 | | ----| 2 # SufficientForAvailability |
18 | | ----| 3 # RequiredForAvailability |
19 | | ----| 4 # MutuallyExclusive |
20 | | ----| 5 # DeprecatedSelectionOption |
| 15 | +--- @class visibleEdge: TraitOutEdgeInfo |
| 16 | +--- @field type Enum.TraitEdgeType |
| 17 | +--- @field visualStyle Enum.TraitEdgeVisualStyle |
| 18 | +--- @field targetNode number # TraitNodeID |
| 19 | +--- @field isActive boolean |
21 | 20 |
|
22 | | ----@alias visualStyle |
23 | | ----| 0 # None |
24 | | ----| 1 # Straight |
| 21 | +--- @class libNodeInfo: TraitNodeInfo |
| 22 | +--- @field ID number # TraitNodeID |
| 23 | +--- @field posX number |
| 24 | +--- @field posY number |
| 25 | +--- @field type Enum.TraitNodeType |
| 26 | +--- @field maxRanks number |
| 27 | +--- @field flags Enum.TraitNodeFlag |
| 28 | +--- @field groupIDs number[] |
| 29 | +--- @field visibleEdges visibleEdge[] # The order does not always match C_Traits |
| 30 | +--- @field conditionIDs number[] |
| 31 | +--- @field entryIDs number[] # TraitEntryID - generally, choice nodes will have 2, otherwise there's just 1 |
| 32 | +--- @field visibleForSpecs table<number, boolean> # specID: true/false, true if a node is visible for a spec |
| 33 | +--- @field grantedForSpecs table<number, boolean> # specID: true/false, true if a node is granted for free, for a spec |
| 34 | +--- @field isClassNode boolean |
| 35 | +--- @field subTreeID number? # the sub tree ID that the node is associated with if any, nil otherwise |
| 36 | +--- @field isSubTreeSelection boolean? # true if the node is a sub tree selection node, nil otherwise |
| 37 | +--- @field isApexTalent boolean # true for "apex" talents (Midnight lvl 81+ talents) |
| 38 | +--- @field requiredPlayerLevel number? # the required level, even if all other conditions are met (such as gates and edges), currently only applies to Apex talents |
25 | 39 |
|
26 | | ----@alias nodeType |
27 | | ----| 0 # single |
28 | | ----| 1 # Tiered |
29 | | ----| 2 # Selection |
| 40 | +--- @class entryInfo: TraitEntryInfo |
| 41 | +--- @field definitionID number # TraitDefinitionID |
| 42 | +--- @field type Enum.TraitNodeEntryType |
| 43 | +--- @field maxRanks number |
| 44 | +--- @field isAvailable boolean # LibTalentTree always returns true |
| 45 | +--- @field conditionIDs number[] # list of TraitConditionID, LibTalentTree always returns an empty table |
| 46 | +--- @field subTreeID number? # the sub tree ID that the entry will select if any, nil otherwise |
30 | 47 |
|
31 | | ----@alias nodeFlags |
32 | | ----| 1 # ShowMultipleIcons |
33 | | ----| 2 # NeverPurchasable |
34 | | ----| 4 # TestPositionLocked |
35 | | ----| 8 # TestGridPositioned |
| 48 | +--- @class gateInfo: TraitGateInfo |
| 49 | +--- @field topLeftNodeID number # TraitNodeID - the node that is the top left corner of the gate |
| 50 | +--- @field conditionID number # TraitConditionID |
| 51 | +--- @field spentAmountRequired number # the total amount of currency required to unlock the gate |
| 52 | +--- @field traitCurrencyID number # TraitCurrencyID |
36 | 53 |
|
37 | | ----@class visibleEdge |
38 | | ----@field type edgeType # see Enum.TraitNodeEdgeType |
39 | | ----@field visualStyle visualStyle # see Enum.TraitEdgeVisualStyle |
40 | | ----@field targetNode number # TraitNodeID |
41 | | - |
42 | | ----@class libNodeInfo |
43 | | ----@field ID number # TraitNodeID |
44 | | ----@field posX number |
45 | | ----@field posY number |
46 | | ----@field type nodeType # see Enum.TraitNodeType |
47 | | ----@field maxRanks number |
48 | | ----@field flags nodeFlags # see Enum.TraitNodeFlag |
49 | | ----@field groupIDs number[] |
50 | | ----@field visibleEdges visibleEdge[] # The order does not always match C_Traits |
51 | | ----@field conditionIDs number[] |
52 | | ----@field entryIDs number[] # TraitEntryID - generally, choice nodes will have 2, otherwise there's just 1 |
53 | | ----@field visibleForSpecs table<number, boolean> # specID: true/false, true if a node is visible for a spec |
54 | | ----@field grantedForSpecs table<number, boolean> # specID: true/false, true if a node is granted for free, for a spec |
55 | | ----@field isClassNode boolean |
56 | | ----@field subTreeID number? # the sub tree ID that the node is associated with if any, nil otherwise |
57 | | ----@field isSubTreeSelection boolean? # true if the node is a sub tree selection node, nil otherwise |
58 | | - |
59 | | ----@class entryInfo |
60 | | ----@field definitionID number # TraitDefinitionID |
61 | | ----@field type number # see Enum.TraitNodeEntryType |
62 | | ----@field maxRanks number |
63 | | ----@field isAvailable boolean # LibTalentTree always returns true |
64 | | ----@field conditionIDs number[] # list of TraitConditionID, LibTalentTree always returns an empty table |
65 | | ----@field subTreeID number? # the sub tree ID that the entry will select if any, nil otherwise |
66 | | - |
67 | | ----@class gateInfo |
68 | | ----@field topLeftNodeID number # TraitNodeID - the node that is the top left corner of the gate |
69 | | ----@field conditionID number # TraitConditionID |
70 | | ----@field spentAmountRequired number # the total amount of currency required to unlock the gate |
71 | | ----@field traitCurrencyID number # TraitCurrencyID |
72 | | - |
73 | | ----@class subTreeInfo |
74 | | ----@field ID number # SubTreeID |
75 | | ----@field name string # localized name |
76 | | ----@field description string # localized description |
77 | | ----@field iconElementID string # icon atlas |
78 | | ----@field maxCurrency number # the maximum amount of currency that can be spent in this sub tree |
79 | | ----@field posX number # generally corresponds to posX of the top center node (generally the initial starting node) |
80 | | ----@field posY number # generally corresponds to posY of the top center node (generally the initial starting node) |
81 | | ----@field requiredPlayerLevel number |
82 | | ----@field traitCurrencyID number # TraitCurrencyID spent when learning talents in this sub tree |
83 | | ----@field subTreeSelectionNodeIDs number[] # TraitNodeID - the selection nodes that specify whether the sub tree is selected |
84 | | ----@field isActive boolean # hardcoded to false |
| 54 | +--- @class subTreeInfo: TraitSubTreeInfo |
| 55 | +--- @field ID number # SubTreeID |
| 56 | +--- @field name string # localized name |
| 57 | +--- @field description string # localized description |
| 58 | +--- @field iconElementID string # icon atlas |
| 59 | +--- @field maxCurrency number # the maximum amount of currency that can be spent in this sub tree |
| 60 | +--- @field posX number # generally corresponds to posX of the top center node (generally the initial starting node) |
| 61 | +--- @field posY number # generally corresponds to posY of the top center node (generally the initial starting node) |
| 62 | +--- @field requiredPlayerLevel number |
| 63 | +--- @field traitCurrencyID number # TraitCurrencyID spent when learning talents in this sub tree |
| 64 | +--- @field subTreeSelectionNodeIDs number[] # TraitNodeID - the selection nodes that specify whether the sub tree is selected |
| 65 | +--- @field isActive boolean # hardcoded to false |
0 commit comments