WowAddons

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

canChangebool
canAddbool
changeErrorstring may be nil

C_ClassTalents.CanCreateNewConfig

canCreate = C_ClassTalents.CanCreateNewConfig()

Returns

canCreatebool

C_ClassTalents.CanEditTalents

canEdit, changeError = C_ClassTalents.CanEditTalents()

Returns true if the player could switch talents if they staged a proper loadout.

Returns

canEditbool
changeErrorcstring

C_ClassTalents.CommitConfig

success = C_ClassTalents.CommitConfig([savedConfigID])

Arguments

savedConfigIDnumber may be nil

Returns

successbool

C_ClassTalents.DeleteConfig

success = C_ClassTalents.DeleteConfig(configID)

Arguments

configIDnumber

Returns

successbool

C_ClassTalents.GetActiveConfigID

activeConfigID = C_ClassTalents.GetActiveConfigID()

Returns

activeConfigIDnumber may be nil

C_ClassTalents.GetActiveHeroTalentSpec

heroSpecID = C_ClassTalents.GetActiveHeroTalentSpec()

Returns the SubTreeID of the player's active Hero Talent Specialization SubTree.

Returns

heroSpecIDnumber may be nilSubTreeID of the player's active Hero Talent Specialization or nil if no Specialization is active.

C_ClassTalents.GetConfigIDsBySpecID

configIDs = C_ClassTalents.GetConfigIDsBySpecID([specID])

Arguments

specIDnumber may be nil

Returns

configIDsnumber[]

C_ClassTalents.GetHasStarterBuild

hasStarterBuild = C_ClassTalents.GetHasStarterBuild()

Returns

hasStarterBuildbool

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

configIDnumber may be nilIf not supplied, defaults to the player's active config
classSpecIDnumber may be nilIf not supplied, defaults to the player's active spec

Returns

subTreeIDsnumber[] may be nilSubTreeIDs of each Hero Talent Specialization
requiredPlayerLevelnumber may be nilThe player level at which one of the Hero Talent Specializations can be activated

C_ClassTalents.GetLastSelectedSavedConfigID

configID = C_ClassTalents.GetLastSelectedSavedConfigID(specID)

Arguments

specIDnumber

Returns

configIDnumber may be nil

C_ClassTalents.GetNextStarterBuildPurchase

nodeID, entryID = C_ClassTalents.GetNextStarterBuildPurchase()

Returns

nodeIDnumber may be nil
entryIDnumber may be nil

C_ClassTalents.GetStarterBuildActive

isActive = C_ClassTalents.GetStarterBuildActive()

Returns

isActivebool

C_ClassTalents.GetTraitTreeForSpec

treeID = C_ClassTalents.GetTraitTreeForSpec(specID)

Arguments

specIDnumber

Returns

treeIDnumber 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

hasUnspentPointsbool
numHeroPointsnumber

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

hasUnspentPointsbool
numClassPointsnumber
numSpecPointsnumber

C_ClassTalents.ImportLoadout

success, importError = C_ClassTalents.ImportLoadout(configID, entries, name, [importString])

Arguments

configIDnumber
entriesImportLoadoutEntryInfo[]
namestring
importStringstring may be nil

Returns

successbool
importErrorcstring

C_ClassTalents.InitializeViewLoadout

C_ClassTalents.InitializeViewLoadout(specID, level)

Arguments

specIDnumber
levelnumber

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

configIDnumber

Returns

isPopulatedbool

C_ClassTalents.LoadConfig

result, changeError, newLearnedNodeIDs = C_ClassTalents.LoadConfig(configID, autoApply)

Arguments

configIDnumber
autoApplybool

Returns

resultLoadConfigResult
changeErrorstring may be nil
newLearnedNodeIDsnumber[]

C_ClassTalents.RenameConfig

success = C_ClassTalents.RenameConfig(configID, name)

Arguments

configIDnumber
namestring

Returns

successbool

C_ClassTalents.RequestNewConfig

success = C_ClassTalents.RequestNewConfig(name)

Arguments

namestring

Returns

successbool

C_ClassTalents.SaveConfig

success = C_ClassTalents.SaveConfig(configID)

Arguments

configIDnumber

Returns

successbool

C_ClassTalents.SetStarterBuildActive

result = C_ClassTalents.SetStarterBuildActive(active)

Arguments

activebool

Returns

resultLoadConfigResult

C_ClassTalents.SetUsesSharedActionBars

C_ClassTalents.SetUsesSharedActionBars(configID, usesShared)

Arguments

configIDnumber
usesSharedbool

C_ClassTalents.SwitchToLoadoutByIndex

C_ClassTalents.SwitchToLoadoutByIndex(loadoutIndex)

Loads loadout for the current specialization by dropdown index. Indices start at 1.

Arguments

loadoutIndexnumber

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

loadoutNamecstring

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

specIndexnumber

C_ClassTalents.SwitchToSpecializationByName

C_ClassTalents.SwitchToSpecializationByName(specName)

Activates specialization for the current class by spec name.

Arguments

specNamecstring

C_ClassTalents.UpdateLastSelectedSavedConfigID

C_ClassTalents.UpdateLastSelectedSavedConfigID(specID, [configID])

Arguments

specIDnumber
configIDnumber may be nil

C_ClassTalents.ViewLoadout

success = C_ClassTalents.ViewLoadout(entries, [importString])

Arguments

entriesImportLoadoutEntryInfo[]
importStringstring may be nil

Returns

successbool

Events

ACTIVE_COMBAT_CONFIG_CHANGED

configIDnumber

CLASS_TALENTS_SWITCH_TO_LOADOUT_BY_INDEX

loadoutIndexnumber

CLASS_TALENTS_SWITCH_TO_LOADOUT_BY_NAME

loadoutNamecstring

CLASS_TALENTS_SWITCH_TO_SPECIALIZATION_BY_INDEX

specIndexnumber

CLASS_TALENTS_SWITCH_TO_SPECIALIZATION_BY_NAME

specNamecstring

SELECTED_LOADOUT_CHANGED

No payload.

SPECIALIZATION_CHANGE_CAST_FAILED

No payload.

STARTER_BUILD_ACTIVATION_FAILED

No payload.

Tables

Enum.LoadConfigResult enumeration

Error0
NoChangesNecessary1
LoadInProgress2
Ready3

ImportLoadoutEntryInfo structure

nodeIDnumber
ranksGrantednumber
ranksPurchasednumber
selectionEntryIDnumber

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows