World of Warcraft Forever API · C_ClassTalents.md, for your AI
C_ClassTalents
31 functions, 8 events, 2 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_ClassTalents.CanChangeTalents
canChange, canAdd, changeError = C_ClassTalents.CanChangeTalents()
Returns true only if the player has staged changes and can commit their talents in their current state.
Returns
canChange | bool | |
|---|---|---|
canAdd | bool | |
changeError | string may be nil |
C_ClassTalents.CanCreateNewConfig
canCreate = C_ClassTalents.CanCreateNewConfig()
Returns
canCreate | bool |
|---|
C_ClassTalents.CanEditTalents
canEdit, changeError = C_ClassTalents.CanEditTalents()
Returns true if the player could switch talents if they staged a proper loadout.
Returns
canEdit | bool | |
|---|---|---|
changeError | cstring |
C_ClassTalents.CommitConfig
success = C_ClassTalents.CommitConfig([savedConfigID])
Arguments
savedConfigID | number may be nil |
|---|
Returns
success | bool |
|---|
C_ClassTalents.DeleteConfig
success = C_ClassTalents.DeleteConfig(configID)
Arguments
configID | number |
|---|
Returns
success | bool |
|---|
C_ClassTalents.GetActiveConfigID
activeConfigID = C_ClassTalents.GetActiveConfigID()
Returns
activeConfigID | number may be nil |
|---|
C_ClassTalents.GetActiveHeroTalentSpec
heroSpecID = C_ClassTalents.GetActiveHeroTalentSpec()
Returns the SubTreeID of the player's active Hero Talent Specialization SubTree.
Returns
heroSpecID | number may be nil | SubTreeID of the player's active Hero Talent Specialization or nil if no Specialization is active. |
|---|
C_ClassTalents.GetConfigIDsBySpecID
configIDs = C_ClassTalents.GetConfigIDsBySpecID([specID])
Arguments
specID | number may be nil |
|---|
Returns
configIDs | number[] |
|---|
C_ClassTalents.GetHasStarterBuild
hasStarterBuild = C_ClassTalents.GetHasStarterBuild()
Returns
hasStarterBuild | bool |
|---|
C_ClassTalents.GetHeroTalentSpecsForClassSpec
subTreeIDs, requiredPlayerLevel = C_ClassTalents.GetHeroTalentSpecsForClassSpec([configID], [classSpecID])
Returns the SubTreeIDs of the Hero Talent Specializations available to a Class Specialization and config; Returns nothing if none available
May return nothing.
Arguments
configID | number may be nil | If not supplied, defaults to the player's active config |
|---|---|---|
classSpecID | number may be nil | If not supplied, defaults to the player's active spec |
Returns
subTreeIDs | number[] may be nil | SubTreeIDs of each Hero Talent Specialization |
|---|---|---|
requiredPlayerLevel | number may be nil | The player level at which one of the Hero Talent Specializations can be activated |
C_ClassTalents.GetLastSelectedSavedConfigID
configID = C_ClassTalents.GetLastSelectedSavedConfigID(specID)
Arguments
specID | number |
|---|
Returns
configID | number may be nil |
|---|
C_ClassTalents.GetNextStarterBuildPurchase
nodeID, entryID = C_ClassTalents.GetNextStarterBuildPurchase()
Returns
nodeID | number may be nil | |
|---|---|---|
entryID | number may be nil |
C_ClassTalents.GetStarterBuildActive
isActive = C_ClassTalents.GetStarterBuildActive()
Returns
isActive | bool |
|---|
C_ClassTalents.GetTraitTreeForSpec
treeID = C_ClassTalents.GetTraitTreeForSpec(specID)
Arguments
specID | number |
|---|
Returns
treeID | number may be nil |
|---|
C_ClassTalents.HasUnspentHeroTalentPoints
hasUnspentPoints, numHeroPoints = C_ClassTalents.HasUnspentHeroTalentPoints()
Returns whether the player has any unspent talent points in their active hero talent tree. If hasUnspentPoints is true, numHeroPoints will be greater than zero.
Returns
hasUnspentPoints | bool | |
|---|---|---|
numHeroPoints | number |
C_ClassTalents.HasUnspentTalentPoints
hasUnspentPoints, numClassPoints, numSpecPoints = C_ClassTalents.HasUnspentTalentPoints()
Returns whether the player has any unspent talent points in their class or spec talent trees. If hasUnspentPoints is true, the number of unspent points for at least one of the trees will be greater than zero. Hero talent points are not included by this function.
Returns
hasUnspentPoints | bool | |
|---|---|---|
numClassPoints | number | |
numSpecPoints | number |
C_ClassTalents.ImportLoadout
success, importError = C_ClassTalents.ImportLoadout(configID, entries, name, [importString])
Arguments
configID | number | |
|---|---|---|
entries | ImportLoadoutEntryInfo[] | |
name | string | |
importString | string may be nil |
Returns
success | bool | |
|---|---|---|
importError | cstring |
C_ClassTalents.InitializeViewLoadout
C_ClassTalents.InitializeViewLoadout(specID, level)
Arguments
specID | number | |
|---|---|---|
level | number |
C_ClassTalents.IsConfigPopulated
isPopulated = C_ClassTalents.IsConfigPopulated(configID)
New configs may or may not be populated and ready to load immediately after creation. Avoid calling for configs intentionally created empty.
Arguments
configID | number |
|---|
Returns
isPopulated | bool |
|---|
C_ClassTalents.LoadConfig
result, changeError, newLearnedNodeIDs = C_ClassTalents.LoadConfig(configID, autoApply)
Arguments
configID | number | |
|---|---|---|
autoApply | bool |
Returns
result | LoadConfigResult | |
|---|---|---|
changeError | string may be nil | |
newLearnedNodeIDs | number[] |
C_ClassTalents.RenameConfig
success = C_ClassTalents.RenameConfig(configID, name)
Arguments
configID | number | |
|---|---|---|
name | string |
Returns
success | bool |
|---|
C_ClassTalents.RequestNewConfig
success = C_ClassTalents.RequestNewConfig(name)
Arguments
name | string |
|---|
Returns
success | bool |
|---|
C_ClassTalents.SaveConfig
success = C_ClassTalents.SaveConfig(configID)
Arguments
configID | number |
|---|
Returns
success | bool |
|---|
C_ClassTalents.SetStarterBuildActive
result = C_ClassTalents.SetStarterBuildActive(active)
Arguments
active | bool |
|---|
Returns
result | LoadConfigResult |
|---|
C_ClassTalents.SwitchToLoadoutByIndex
C_ClassTalents.SwitchToLoadoutByIndex(loadoutIndex)
Loads loadout for the current specialization by dropdown index. Indices start at 1.
Arguments
loadoutIndex | number |
|---|
C_ClassTalents.SwitchToLoadoutByName
C_ClassTalents.SwitchToLoadoutByName(loadoutName)
Loads loadout for the current specialization by name. Loads the first one found in the case of duplicate names.
Arguments
loadoutName | cstring |
|---|
C_ClassTalents.SwitchToSpecializationByIndex
C_ClassTalents.SwitchToSpecializationByIndex(specIndex)
Activates specialization for the current class by index in the order within the Specializations tab. Indices start at 1.
Arguments
specIndex | number |
|---|
C_ClassTalents.SwitchToSpecializationByName
C_ClassTalents.SwitchToSpecializationByName(specName)
Activates specialization for the current class by spec name.
Arguments
specName | cstring |
|---|
C_ClassTalents.UpdateLastSelectedSavedConfigID
C_ClassTalents.UpdateLastSelectedSavedConfigID(specID, [configID])
Arguments
specID | number | |
|---|---|---|
configID | number may be nil |
C_ClassTalents.ViewLoadout
success = C_ClassTalents.ViewLoadout(entries, [importString])
Arguments
entries | ImportLoadoutEntryInfo[] | |
|---|---|---|
importString | string may be nil |
Returns
success | bool |
|---|
Events
ACTIVE_COMBAT_CONFIG_CHANGED
configID | number |
|---|
CLASS_TALENTS_SWITCH_TO_LOADOUT_BY_INDEX
loadoutIndex | number |
|---|
CLASS_TALENTS_SWITCH_TO_LOADOUT_BY_NAME
loadoutName | cstring |
|---|
CLASS_TALENTS_SWITCH_TO_SPECIALIZATION_BY_INDEX
specIndex | number |
|---|
CLASS_TALENTS_SWITCH_TO_SPECIALIZATION_BY_NAME
specName | cstring |
|---|
SELECTED_LOADOUT_CHANGED
No payload.
SPECIALIZATION_CHANGE_CAST_FAILED
No payload.
STARTER_BUILD_ACTIVATION_FAILED
No payload.
Tables
Enum.LoadConfigResult enumeration
Error | 0 |
|---|---|
NoChangesNecessary | 1 |
LoadInProgress | 2 |
Ready | 3 |
ImportLoadoutEntryInfo structure
nodeID | number | |
|---|---|---|
ranksGranted | number | |
ranksPurchased | number | |
selectionEntryID | number |