v0.13.8

C_Traits

namespaceavailable in: camelot

Status in wowlua

53 functions: 11 implemented, 23 recorded, 19 guessed. 15 events, 4 of them fired by the emulator on its own.

Functions

functionwhat it doesstatus
CanEditConfigReturns whether the player can make changes to the specified talent config.
(configID: number): (boolean, string)
recorded
CanPurchaseRankChecks whether a node entry is purchasable.
(configID: number, nodeID: number, nodeEntryID: number): boolean
implemented
CanRefundRankWhether a rank of the talent node can be refunded. · by wowlua
(configID: number, nodeID: number): boolean
implemented
CascadeRepurchaseRanksBuys back the node's ranks that a previous refund removed. · by wowlua
(configID: number, nodeID: number, entryID: number?): boolean
guessed
ClearCascadeRepurchaseHistoryClears the record of refunded ranks that can be bought back in the talent loadout. · by wowlua
(configID: number)
guessed
CloseTraitSystemInteractionCloses the open trait system interaction. · by wowlua
()
guessed
CommitConfigApplies any pending changes to talents.
(configID: number): boolean
implemented
ConfigHasStagedChangesWhether the talent loadout has changes that are not committed yet. · by wowlua
(configID: number): boolean
implemented
GenerateImportStringGenerate a talent loadout string for a given loadout
(configID: number): string
guessed
GenerateInspectImportStringReturns a Talent Build String for an inspected target
(target: string): string
guessed
GetConditionInfoReturns conditionInfo applicable to the configID you enter
(configID: number, condID: number): TraitCondInfo?
implemented
GetConfigIDBySystemIDReturns the config ID of the trait system. · by wowlua
(systemID: number): number?
guessed
GetConfigIDByTreeIDUsed for "Generic Trait" trees, such as dragonflying talents. Not used for player talent trees.
(treeID: number): number?
recorded
GetConfigInfoReturns information about the trait config (talent loadout). · by wowlua
(configID: number): TraitConfigInfo?
implemented
GetConfigVariationIDReturns the config variation ID of the trait system. · by wowlua
(systemID: number): number?
guessed
GetConfigsByTypeReturns the IDs of the trait configs of the given type. · by wowlua
(configType: TraitConfigType): number[]
recorded
GetDefinitionInfoReturns information about the trait definition, such as its spell and name. · by wowlua
(definitionID: number): TraitDefinitionInfo?
recorded
GetEntryInfoRetrieves Node Entry information.
(configID: number, entryID: number): TraitEntryInfo?
recorded
GetGroupCurrencyInfoReturns the trait currency information for the given talent groups. · by wowlua
(configID: number, groupIDs: number[]): GroupCurrencyInfo[]
recorded
GetGroupDisplayInfoByTreeIDReturns display information about the groups of the talent tree. · by wowlua
(treeID: number): TraitGroupDisplayInfo[]
recorded
GetIncreasedTraitDataReturns the bonus ranks other sources add to the node's entry. · by wowlua
(nodeID: number, entryID: number): IncreasedTraitData[]?
recorded
GetLoadoutSerializationVersionReturns the version of the Talent Build String format.
(): number
recorded
GetMaxAvailableTraitCurrencyReturns the most of the trait currency that can be available. · by wowlua
(traitCurrencyID: number, limitBySourcedMax: boolean): number
recorded
GetNodeCostReturns the cost of the talent node. · by wowlua
(configID: number, nodeID: number): TraitCurrencyCost[]
recorded
GetNodeInfoReturns NodeInfo applicable to the configID you enter.
(configID: number, nodeID: number): TraitNodeInfo?
implemented
GetStagedChangesReturns 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
GetStagedChangesCostReturns the cost of the uncommitted changes in the trait config. · by wowlua
(configID: number): TraitCurrencyCost[]
recorded
GetSubTreeInfoReturns information about a sub tree (such as a hero talent tree) of the trait config. · by wowlua
(configID: number, subTreeID: number): TraitSubTreeInfo?
guessed
GetSystemIDByTreeIDReturns the ID of the trait system the talent tree belongs to. · by wowlua
(treeID: number): number?
recorded
GetTraitCurrencyForAchievementReturns how much of the trait currency the achievement grants. · by wowlua
(traitCurrencyID: number, achievementID: number): number
recorded
GetTraitCurrencyInfoReturns 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
GetTraitDescriptionReturns the description of a talent entry at the given rank. · by wowlua
(entryID: number, rank: number): string?
recorded
GetTraitSystemFlagsReturns flags for "Generic Trait" trees. Such as dragonriding talents. Not related to player talent trees.
(configID: number): number?
recorded
GetTraitSystemWidgetSetIDReturns the UI widget set ID of the trait config's system. · by wowlua
(configID: number): number?
recorded
GetTreeCurrencyInfoReturns the list of TraitCurrencies related to a TraitTree.
(configID: number, treeID: number, excludeStagedChanges: boolean): TreeCurrencyInfo[]
implemented
GetTreeHashGet a checksum of the specified tree's structure.
(treeID: number): number[]
recorded
GetTreeInfoReturns information about the talent tree in the trait config. · by wowlua
(configID: number, treeID: number): TraitTreeInfo?
recorded
GetTreeNodesReturns 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
HasValidInspectDataWhether talent data for the inspected unit is available. · by wowlua
(): boolean
recorded
IsReadyForCommitWhether staged talent changes can be committed now. · by wowlua
(): boolean
recorded
PurchaseAllRanksBuys every rank of the talent node it can; returns whether any was bought. · by wowlua
(configID: number, nodeID: number, ignoreCost: boolean): boolean
guessed
PurchaseRankAttempt 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
RefundAllRanksRefunds every rank of the talent node; returns whether it succeeded. · by wowlua
(configID: number, nodeID: number): boolean
guessed
RefundRankAttempt 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
ResetTreeResets 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
ResetTreeByCurrencyResets 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
RollbackConfigRolls back any pending changes to the trait config - reverting any unsaved changes.
(configID: number): boolean
implemented
SetSelectionAttempt 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
StageConfigStages the trait config's changes; returns whether it succeeded. · by wowlua
(configID: number): boolean
guessed
TalentTestUnlearnSpellsUnused, assumed to be an internal debugging API
()
guessed
TryPurchaseAllRanksBuys every rank of the talent node it can; returns whether any was bought. · by wowlua
(configID: number, nodeID: number): boolean
guessed
TryPurchaseToNodeBuys the talent nodes needed to reach the given node; returns whether it succeeded. · by wowlua
(configID: number, nodeID: number): boolean
guessed
TryRefundToNodeRefunds 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

eventpayloadfired by the emulator
CONFIG_COMMIT_FAILEDconfigID: numbernot implemented
TRAIT_COND_INFO_CHANGEDcondID: numbernot implemented
TRAIT_CONFIG_CREATEDconfigInfo: TraitConfigInfonot implemented
TRAIT_CONFIG_DELETEDconfigID: numbernot implemented
TRAIT_CONFIG_LIST_UPDATEDno payloadimplemented
TRAIT_CONFIG_UPDATEDconfigID: numberimplemented
TRAIT_NODE_CHANGEDnodeID: numberimplemented
TRAIT_NODE_CHANGED_PARTIALID: number, info: TraitNodeInfoPartialnot implemented
TRAIT_NODE_ENTRY_UPDATEDnodeEntryID: numbernot implemented
TRAIT_SUB_TREE_CHANGEDsubTreeID: numbernot implemented
TRAIT_SYSTEM_INTERACTION_STARTEDtreeID: numbernot implemented
TRAIT_SYSTEM_NPC_CLOSEDno payloadnot implemented
TRAIT_TREE_CHANGEDtreeID: numbernot implemented
TRAIT_TREE_CURRENCY_INFO_UPDATEDtreeID: numberimplemented
TRY_PURCHASE_TO_NODE_PARTIAL_SUCCESSnodeFinishedOn: numbernot 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, currencyInfos
  • IncreasedTraitData · itemNameIncreasing, itemQualityIncreasing, numPointsIncreased
  • TraitCondInfo · condID, ranksGranted?, isAlwaysMet, isMet, isGate, isSufficient, type, questID?, achievementID?, specSetID?, playerLevel?, traitCurrencyID?, spentAmountRequired?, tooltipFormat?, traitCondAccountElementID?
  • TraitConfigInfo · ID, type, name, treeIDs, usesSharedActionBars
  • TraitCurrencyCost · ID, amount
  • TraitDefinitionInfo · spellID?, overrideName?, overrideSubtext?, overrideDescription?, overrideIcon?, overriddenSpellID?, subType?
  • TraitEntryInfo · definitionID?, subTreeID?, type, maxRanks, isAvailable, isDisplayError, conditionIDs
  • TraitEntryRankInfo · entryID, rank
  • TraitGateInfo · topLeftNodeID, conditionID
  • TraitGroupDisplayInfo · groupID, treeID, skillLineID, orderIndex, displayName, icon
  • TraitNodeInfo · 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, isActive
  • TraitSubTreeInfo · ID, name?, description?, iconElementID?, traitCurrencyID?, isActive, subTreeSelectionNodeIDs, posX, posY
  • TraitTreeInfo · 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.