C_Traits
namespaceavailable in: camelotStatus in wowlua
53 functions: 11 implemented, 23 recorded, 19 guessed. 15 events, 4 of them fired by the emulator on its own.
Functions
| function | what it does | status |
|---|---|---|
CanEditConfig | Returns whether the player can make changes to the specified talent config.(configID: number): (boolean, string) | recorded |
CanPurchaseRank | Checks whether a node entry is purchasable.(configID: number, nodeID: number, nodeEntryID: number): boolean | implemented |
CanRefundRank | Whether a rank of the talent node can be refunded. · by wowlua(configID: number, nodeID: number): boolean | implemented |
CascadeRepurchaseRanks | Buys back the node's ranks that a previous refund removed. · by wowlua(configID: number, nodeID: number, entryID: number?): boolean | guessed |
ClearCascadeRepurchaseHistory | Clears the record of refunded ranks that can be bought back in the talent loadout. · by wowlua(configID: number) | guessed |
CloseTraitSystemInteraction | Closes the open trait system interaction. · by wowlua() | guessed |
CommitConfig | Applies any pending changes to talents.(configID: number): boolean | implemented |
ConfigHasStagedChanges | Whether the talent loadout has changes that are not committed yet. · by wowlua(configID: number): boolean | implemented |
GenerateImportString | Generate a talent loadout string for a given loadout(configID: number): string | guessed |
GenerateInspectImportString | Returns a Talent Build String for an inspected target(target: string): string | guessed |
GetConditionInfo | Returns conditionInfo applicable to the configID you enter(configID: number, condID: number): TraitCondInfo? | implemented |
GetConfigIDBySystemID | Returns the config ID of the trait system. · by wowlua(systemID: number): number? | guessed |
GetConfigIDByTreeID | Used for "Generic Trait" trees, such as dragonflying talents. Not used for player talent trees.(treeID: number): number? | recorded |
GetConfigInfo | Returns information about the trait config (talent loadout). · by wowlua(configID: number): TraitConfigInfo? | implemented |
GetConfigVariationID | Returns the config variation ID of the trait system. · by wowlua(systemID: number): number? | guessed |
GetConfigsByType | Returns the IDs of the trait configs of the given type. · by wowlua(configType: TraitConfigType): number[] | recorded |
GetDefinitionInfo | Returns information about the trait definition, such as its spell and name. · by wowlua(definitionID: number): TraitDefinitionInfo? | recorded |
GetEntryInfo | Retrieves Node Entry information.(configID: number, entryID: number): TraitEntryInfo? | recorded |
GetGroupCurrencyInfo | Returns the trait currency information for the given talent groups. · by wowlua(configID: number, groupIDs: number[]): GroupCurrencyInfo[] | recorded |
GetGroupDisplayInfoByTreeID | Returns display information about the groups of the talent tree. · by wowlua(treeID: number): TraitGroupDisplayInfo[] | recorded |
GetIncreasedTraitData | Returns the bonus ranks other sources add to the node's entry. · by wowlua(nodeID: number, entryID: number): IncreasedTraitData[]? | recorded |
GetLoadoutSerializationVersion | Returns the version of the Talent Build String format.(): number | recorded |
GetMaxAvailableTraitCurrency | Returns the most of the trait currency that can be available. · by wowlua(traitCurrencyID: number, limitBySourcedMax: boolean): number | recorded |
GetNodeCost | Returns the cost of the talent node. · by wowlua(configID: number, nodeID: number): TraitCurrencyCost[] | recorded |
GetNodeInfo | Returns NodeInfo applicable to the configID you enter.(configID: number, nodeID: number): TraitNodeInfo? | implemented |
GetStagedChanges | Returns IDs of Trait Nodes with pending changes, grouped by the type of change; Returns nothing if there are no pending changes(configID: number): (number[]?, number[]?, number[]?) | implemented |
GetStagedChangesCost | Returns the cost of the uncommitted changes in the trait config. · by wowlua(configID: number): TraitCurrencyCost[] | recorded |
GetSubTreeInfo | Returns information about a sub tree (such as a hero talent tree) of the trait config. · by wowlua(configID: number, subTreeID: number): TraitSubTreeInfo? | guessed |
GetSystemIDByTreeID | Returns the ID of the trait system the talent tree belongs to. · by wowlua(treeID: number): number? | recorded |
GetTraitCurrencyForAchievement | Returns how much of the trait currency the achievement grants. · by wowlua(traitCurrencyID: number, achievementID: number): number | recorded |
GetTraitCurrencyInfo | Returns meta information about a TraitCurrency, use C_Traits.GetTreeCurrencyInfo if you're looking for TraitCurrency spent/available instead.(traitCurrencyID: number): (number, number, number?, number?) | recorded |
GetTraitDescription | Returns the description of a talent entry at the given rank. · by wowlua(entryID: number, rank: number): string? | recorded |
GetTraitSystemFlags | Returns flags for "Generic Trait" trees. Such as dragonriding talents. Not related to player talent trees.(configID: number): number? | recorded |
GetTraitSystemWidgetSetID | Returns the UI widget set ID of the trait config's system. · by wowlua(configID: number): number? | recorded |
GetTreeCurrencyInfo | Returns the list of TraitCurrencies related to a TraitTree.(configID: number, treeID: number, excludeStagedChanges: boolean): TreeCurrencyInfo[] | implemented |
GetTreeHash | Get a checksum of the specified tree's structure.(treeID: number): number[] | recorded |
GetTreeInfo | Returns information about the talent tree in the trait config. · by wowlua(configID: number, treeID: number): TraitTreeInfo? | recorded |
GetTreeNodes | Returns a list of nodeIDs for a given treeID. For talent trees, this contains nodes for all specializations of the tree's class.(treeID: number): number[]? | recorded |
HasValidInspectData | Whether talent data for the inspected unit is available. · by wowlua(): boolean | recorded |
IsReadyForCommit | Whether staged talent changes can be committed now. · by wowlua(): boolean | recorded |
PurchaseAllRanks | Buys every rank of the talent node it can; returns whether any was bought. · by wowlua(configID: number, nodeID: number, ignoreCost: boolean): boolean | guessed |
PurchaseRank | Attempt to purchase a rank. Changes are not applied until they are committed (through C_Traits.CommitConfig or C_ClassTalents.CommitConfig).(configID: number, nodeID: number): boolean | implemented |
RefundAllRanks | Refunds every rank of the talent node; returns whether it succeeded. · by wowlua(configID: number, nodeID: number): boolean | guessed |
RefundRank | Attempt to refund a rank. Changes are not applied until they are committed (through C_Traits.CommitConfig or C_ClassTalents.CommitConfig).(configID: number, nodeID: number, clearEdges: boolean?): boolean | guessed |
ResetTree | Resets the tree, refunding any purchased traits where possible. The reset is not automatically saved, use C_Traits.CommitConfig for that.(configID: number, treeID: number): boolean | guessed |
ResetTreeByCurrency | Resets the tree, refunding any purchased traits where possible, but only if the trait costs the specified traitCurrencyID(configID: number, treeID: number, traitCurrencyID: number): boolean | guessed |
RollbackConfig | Rolls back any pending changes to the trait config - reverting any unsaved changes.(configID: number): boolean | implemented |
SetSelection | Attempt change the current selection for a selection node (aka choice node). Changes are not applied until they are committed (through C_Traits.CommitConfig or C_ClassTalents.CommitConfig).(configID: number, nodeID: number, nodeEntryID: number?, clearEdges: boolean?): boolean | guessed |
StageConfig | Stages the trait config's changes; returns whether it succeeded. · by wowlua(configID: number): boolean | guessed |
TalentTestUnlearnSpells | Unused, assumed to be an internal debugging API() | guessed |
TryPurchaseAllRanks | Buys every rank of the talent node it can; returns whether any was bought. · by wowlua(configID: number, nodeID: number): boolean | guessed |
TryPurchaseToNode | Buys the talent nodes needed to reach the given node; returns whether it succeeded. · by wowlua(configID: number, nodeID: number): boolean | guessed |
TryRefundToNode | Refunds talents back to the given node; returns whether it succeeded. · by wowlua(configID: number, nodeID: number, entryID: number): boolean | guessed |
"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.
Events
| event | payload | fired by the emulator |
|---|---|---|
CONFIG_COMMIT_FAILED | configID: number | not implemented |
TRAIT_COND_INFO_CHANGED | condID: number | not implemented |
TRAIT_CONFIG_CREATED | configInfo: TraitConfigInfo | not implemented |
TRAIT_CONFIG_DELETED | configID: number | not implemented |
TRAIT_CONFIG_LIST_UPDATED | no payload | implemented |
TRAIT_CONFIG_UPDATED | configID: number | implemented |
TRAIT_NODE_CHANGED | nodeID: number | implemented |
TRAIT_NODE_CHANGED_PARTIAL | ID: number, info: TraitNodeInfoPartial | not implemented |
TRAIT_NODE_ENTRY_UPDATED | nodeEntryID: number | not implemented |
TRAIT_SUB_TREE_CHANGED | subTreeID: number | not implemented |
TRAIT_SYSTEM_INTERACTION_STARTED | treeID: number | not implemented |
TRAIT_SYSTEM_NPC_CLOSED | no payload | not implemented |
TRAIT_TREE_CHANGED | treeID: number | not implemented |
TRAIT_TREE_CURRENCY_INFO_UPDATED | treeID: number | implemented |
TRY_PURCHASE_TO_NODE_PARTIAL_SUCCESS | nodeFinishedOn: number | not implemented |
An event the emulator doesn't fire on its own can still be fired from a test: mock.fireEvent("CONFIG_COMMIT_FAILED").
Structures
GroupCurrencyInfo· traitNodeGroupID, currencyInfosIncreasedTraitData· itemNameIncreasing, itemQualityIncreasing, numPointsIncreasedTraitCondInfo· condID, ranksGranted?, isAlwaysMet, isMet, isGate, isSufficient, type, questID?, achievementID?, specSetID?, playerLevel?, traitCurrencyID?, spentAmountRequired?, tooltipFormat?, traitCondAccountElementID?TraitConfigInfo· ID, type, name, treeIDs, usesSharedActionBarsTraitCurrencyCost· ID, amountTraitDefinitionInfo· spellID?, overrideName?, overrideSubtext?, overrideDescription?, overrideIcon?, overriddenSpellID?, subType?TraitEntryInfo· definitionID?, subTreeID?, type, maxRanks, isAvailable, isDisplayError, conditionIDsTraitEntryRankInfo· entryID, rankTraitGateInfo· topLeftNodeID, conditionIDTraitGroupDisplayInfo· groupID, treeID, skillLineID, orderIndex, displayName, iconTraitNodeInfo· ID, posX, posY, flags, entryIDs, entryIDsWithCommittedRanks, canPurchaseRank, canRefundRank, isAvailable, isVisible, isDisplayError, ranksPurchased, ranksIncreased, entryIDToRanksIncreased, activeRank, currentRank, activeEntry?, nextEntry?, maxRanks, totalMaxRanks, type, visibleEdges, meetsEdgeRequirements, groupIDs, conditionIDs, isCascadeRepurchasable, cascadeRepurchaseEntryID?, subTreeID?, subTreeActive?TraitNodeInfoPartial· canPurchaseRank?, canRefundRank?, isAvailable?, isVisible?, ranksPurchased?, activeRank?, currentRank?, meetsEdgeRequirements?, isCascadeRepurchasable?, activeEntryID?, subTreeActive?TraitOutEdgeInfo· targetNode, type, visualStyle, isActiveTraitSubTreeInfo· ID, name?, description?, iconElementID?, traitCurrencyID?, isActive, subTreeSelectionNodeIDs, posX, posYTraitTreeInfo· ID, gates, hideSingleRankNumbers, cannotRefund, rootNodeID?, uiTextureKit, titleText?TreeCurrencyInfo· traitCurrencyID, quantity, maxQuantity?, spent, spentInTree?
sources
Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (SharedTraits system, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.