World of Warcraft Forever API · C_ActionBar.md, for your AI
C_ActionBar
73 functions, 15 events, 1 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_ActionBar.EnableActionRangeCheck
C_ActionBar.EnableActionRangeCheck(actionID, enable)
Used in conjunction with ActionRangeCheckUpdate to inform the UI when an action goes in or out of range with its current target.
Arguments
actionID | luaIndex | |
|---|---|---|
enable | bool | True if changes in range for the action should dispatch ActionRangeCheckUpdate. False if the action no longer needs the event. |
C_ActionBar.FindAssistedCombatActionButtons
slots = C_ActionBar.FindAssistedCombatActionButtons([setToSearch])
Returns the list of action bar slots that contain the Assisted Combat action spell.
May return nothing.
Arguments
setToSearch | ActionBarSet default "All" |
|---|
Returns
slots | luaIndex[] |
|---|
C_ActionBar.FindFlyoutActionButtons
slots = C_ActionBar.FindFlyoutActionButtons(flyoutID, [setToSearch])
May return nothing.
Arguments
flyoutID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
slots | luaIndex[] |
|---|
C_ActionBar.FindPetActionButtons
slots = C_ActionBar.FindPetActionButtons(petActionID, [setToSearch])
May return nothing.
Arguments
petActionID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
slots | luaIndex[] |
|---|
C_ActionBar.FindSpellActionButtons
slots = C_ActionBar.FindSpellActionButtons(spellID, [setToSearch])
Returns the list of action bar slots that contain a specified spell.
May return nothing.
Arguments
spellID | SpellIdentifier | Expects a base spell, so if a spell is overridden the base ID should be provided. |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
slots | luaIndex[] |
|---|
C_ActionBar.ForceUpdateAction
C_ActionBar.ForceUpdateAction(slotID, [suppressEvents])
Force updates some internals for an action button slot.
Arguments
slotID | luaIndex | |
|---|---|---|
suppressEvents | bool default false |
C_ActionBar.GetActionAutocast
autocastAllowed, autocastEnabled = C_ActionBar.GetActionAutocast(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
autocastAllowed | bool | |
|---|---|---|
autocastEnabled | bool |
C_ActionBar.GetActionBarPage
currentPage = C_ActionBar.GetActionBarPage()
Returns
currentPage | luaIndex |
|---|
C_ActionBar.GetActionChargeDuration
duration = C_ActionBar.GetActionChargeDuration(actionID)
Returns a duration object describing the active recharge time for an action.
Arguments
actionID | luaIndex |
|---|
Returns
duration | LuaDurationObject |
|---|
C_ActionBar.GetActionCharges
chargeInfo = C_ActionBar.GetActionCharges(actionID)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
actionID | luaIndex |
|---|
Returns
chargeInfo | SpellChargeInfo |
|---|
C_ActionBar.GetActionCooldown
cooldownInfo = C_ActionBar.GetActionCooldown(actionID)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
actionID | luaIndex |
|---|
Returns
cooldownInfo | SpellCooldownInfo |
|---|
C_ActionBar.GetActionCooldownDuration
duration = C_ActionBar.GetActionCooldownDuration(actionID, [ignoreGCD])
Returns a duration object describing the active cooldown duration for an action.
Arguments
actionID | luaIndex | |
|---|---|---|
ignoreGCD | bool default false |
Returns
duration | LuaDurationObject |
|---|
C_ActionBar.GetActionDisplayCount
displayCount = C_ActionBar.GetActionDisplayCount(actionID, [maxDisplayCount], [replacementString])
Depending on the action type, return a string that is either the use count or number of charges. If value is beyond the display count parameter, returns the replacementString (defaults to '*').
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
actionID | luaIndex | |
|---|---|---|
maxDisplayCount | number default 9999 | |
replacementString | cstring default "*" |
Returns
displayCount | string |
|---|
C_ActionBar.GetActionLossOfControlCooldownDuration
duration = C_ActionBar.GetActionLossOfControlCooldownDuration(actionID)
Returns a duration object describing the active loss of control cooldown duration for an action.
Arguments
actionID | luaIndex |
|---|
Returns
duration | LuaDurationObject |
|---|
C_ActionBar.GetActionLossOfControlCooldownInfo
lossOfControlInfo = C_ActionBar.GetActionLossOfControlCooldownInfo(actionID)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
actionID | luaIndex |
|---|
Returns
lossOfControlInfo | SpellLossOfControlInfo |
|---|
C_ActionBar.GetActionText
text = C_ActionBar.GetActionText(actionID)
May return nothing.
Arguments
actionID | luaIndex |
|---|
Returns
text | string |
|---|
C_ActionBar.GetActionTexture
textureFileID = C_ActionBar.GetActionTexture(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
textureFileID | fileID |
|---|
C_ActionBar.GetActionUseCount
count = C_ActionBar.GetActionUseCount(actionID)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
actionID | luaIndex |
|---|
Returns
count | number |
|---|
C_ActionBar.GetBonusBarIndex
bonusBarIndex = C_ActionBar.GetBonusBarIndex()
Returns
bonusBarIndex | luaIndex |
|---|
C_ActionBar.GetBonusBarIndexForSlot
bonusBarIndex = C_ActionBar.GetBonusBarIndexForSlot(slotID)
Arguments
slotID | luaIndex |
|---|
Returns
bonusBarIndex | luaIndex may be nil |
|---|
C_ActionBar.GetBonusBarOffset
bonusBarOffset = C_ActionBar.GetBonusBarOffset()
Returns
bonusBarOffset | number |
|---|
C_ActionBar.GetExtraBarIndex
extraBarIndex = C_ActionBar.GetExtraBarIndex()
Returns
extraBarIndex | luaIndex |
|---|
C_ActionBar.GetItemActionOnEquipSpellID
onEquipSpellID = C_ActionBar.GetItemActionOnEquipSpellID(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
onEquipSpellID | number may be nil |
|---|
C_ActionBar.GetMultiCastBarIndex
multiCastBarIndex = C_ActionBar.GetMultiCastBarIndex()
Returns
multiCastBarIndex | luaIndex |
|---|
C_ActionBar.GetOverrideBarIndex
overrideBarIndex = C_ActionBar.GetOverrideBarIndex()
Returns
overrideBarIndex | luaIndex |
|---|
C_ActionBar.GetOverrideBarSkin
textureFileID = C_ActionBar.GetOverrideBarSkin()
Returns
textureFileID | fileID may be nil |
|---|
C_ActionBar.GetPetActionPetBarIndices
slots = C_ActionBar.GetPetActionPetBarIndices(petActionID, [setToSearch])
May return nothing.
Arguments
petActionID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
slots | luaIndex[] |
|---|
C_ActionBar.GetProfessionQuality
quality = C_ActionBar.GetProfessionQuality(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
quality | number may be nil |
|---|
C_ActionBar.GetProfessionQualityInfo
info = C_ActionBar.GetProfessionQualityInfo(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
info | CraftingQualityInfo may be nil |
|---|
C_ActionBar.GetSpell
spellID = C_ActionBar.GetSpell(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
spellID | number |
|---|
C_ActionBar.GetTempShapeshiftBarIndex
tempShapeshiftBarIndex = C_ActionBar.GetTempShapeshiftBarIndex()
Returns
tempShapeshiftBarIndex | luaIndex |
|---|
C_ActionBar.GetVehicleBarIndex
vehicleBarIndex = C_ActionBar.GetVehicleBarIndex()
Returns
vehicleBarIndex | luaIndex |
|---|
C_ActionBar.HasAction
hasAction = C_ActionBar.HasAction(actionID)
Returns true if an actionbar slot is populated with an action.
Arguments
actionID | luaIndex |
|---|
Returns
hasAction | bool |
|---|
C_ActionBar.HasAssistedCombatActionButtons
hasButtons = C_ActionBar.HasAssistedCombatActionButtons([setToSearch])
Arguments
setToSearch | ActionBarSet default "All" |
|---|
Returns
hasButtons | bool |
|---|
C_ActionBar.HasBonusActionBar
hasBonusActionBar = C_ActionBar.HasBonusActionBar()
Returns
hasBonusActionBar | bool |
|---|
C_ActionBar.HasExtraActionBar
hasExtraActionBar = C_ActionBar.HasExtraActionBar()
Returns
hasExtraActionBar | bool |
|---|
C_ActionBar.HasFlyoutActionButtons
hasFlyoutActionButtons = C_ActionBar.HasFlyoutActionButtons(flyoutID, [setToSearch])
Arguments
flyoutID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
hasFlyoutActionButtons | bool |
|---|
C_ActionBar.HasOverrideActionBar
hasOverrideActionBar = C_ActionBar.HasOverrideActionBar()
Returns
hasOverrideActionBar | bool |
|---|
C_ActionBar.HasPetActionButtons
hasPetActionButtons = C_ActionBar.HasPetActionButtons(petActionID, [setToSearch])
Arguments
petActionID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
hasPetActionButtons | bool |
|---|
C_ActionBar.HasPetActionPetBarIndices
hasPetActionPetBarIndices = C_ActionBar.HasPetActionPetBarIndices(petActionID, [setToSearch])
Arguments
petActionID | number | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
hasPetActionPetBarIndices | bool |
|---|
C_ActionBar.HasRangeRequirements
hasRangeRequirements = C_ActionBar.HasRangeRequirements(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
hasRangeRequirements | bool |
|---|
C_ActionBar.HasSpellActionButtons
hasSpellActionButtons = C_ActionBar.HasSpellActionButtons(spellID, [setToSearch])
Arguments
spellID | SpellIdentifier | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
hasSpellActionButtons | bool |
|---|
C_ActionBar.HasTempShapeshiftActionBar
hasTempShapeshiftActionBar = C_ActionBar.HasTempShapeshiftActionBar()
Returns
hasTempShapeshiftActionBar | bool |
|---|
C_ActionBar.HasVehicleActionBar
hasVehicleActionBar = C_ActionBar.HasVehicleActionBar()
Returns
hasVehicleActionBar | bool |
|---|
C_ActionBar.IsActionInRange
isInRange = C_ActionBar.IsActionInRange(actionID, [target])
Arguments
actionID | luaIndex | |
|---|---|---|
target | UnitToken may be nil |
Returns
isInRange | bool may be nil | If nil, range cannot be determined (eg. no target is available). |
|---|
C_ActionBar.IsAssistedCombatAction
isAssistedCombatAction = C_ActionBar.IsAssistedCombatAction(slotID)
Returns whether the given action button contains the Assisted Combat action spell.
Arguments
slotID | luaIndex |
|---|
Returns
isAssistedCombatAction | bool |
|---|
C_ActionBar.IsAttackAction
isAttackAction = C_ActionBar.IsAttackAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isAttackAction | bool |
|---|
C_ActionBar.IsAutoCastPetAction
isAutoCastPetAction = C_ActionBar.IsAutoCastPetAction(slotID)
Arguments
slotID | luaIndex |
|---|
Returns
isAutoCastPetAction | bool |
|---|
C_ActionBar.IsAutoRepeatAction
isAutoRepeatAction = C_ActionBar.IsAutoRepeatAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isAutoRepeatAction | bool |
|---|
C_ActionBar.IsConsumableAction
isConsumableAction = C_ActionBar.IsConsumableAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isConsumableAction | bool |
|---|
C_ActionBar.IsCurrentAction
isCurrentAction = C_ActionBar.IsCurrentAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isCurrentAction | bool |
|---|
C_ActionBar.IsEnabledAutoCastPetAction
isEnabledAutoCastPetAction = C_ActionBar.IsEnabledAutoCastPetAction(slotID)
Arguments
slotID | luaIndex |
|---|
Returns
isEnabledAutoCastPetAction | bool |
|---|
C_ActionBar.IsEquippedAction
isEquippedAction = C_ActionBar.IsEquippedAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isEquippedAction | bool |
|---|
C_ActionBar.IsEquippedGearOutfitAction
isEquippedGearOutfitAction = C_ActionBar.IsEquippedGearOutfitAction(slotID)
Arguments
slotID | luaIndex |
|---|
Returns
isEquippedGearOutfitAction | bool |
|---|
C_ActionBar.IsHarmfulAction
isHarmful = C_ActionBar.IsHarmfulAction(actionID, useNeutral)
Arguments
actionID | luaIndex | |
|---|---|---|
useNeutral | bool |
Returns
isHarmful | bool |
|---|
C_ActionBar.IsHelpfulAction
isHelpful = C_ActionBar.IsHelpfulAction(actionID, useNeutral)
Arguments
actionID | luaIndex | |
|---|---|---|
useNeutral | bool |
Returns
isHelpful | bool |
|---|
C_ActionBar.IsHighestSpellRank
isHighestRank = C_ActionBar.IsHighestSpellRank(spellID)
Arguments
spellID | SpellIdentifier |
|---|
Returns
isHighestRank | bool |
|---|
C_ActionBar.IsInterruptAction
isInterruptAction = C_ActionBar.IsInterruptAction(slotID)
Returns whether the given action button contains a spell that can interrupt spellcasting.
Arguments
slotID | luaIndex |
|---|
Returns
isInterruptAction | bool |
|---|
C_ActionBar.IsItemAction
isItemAction = C_ActionBar.IsItemAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isItemAction | bool |
|---|
C_ActionBar.IsMacroActionWithShowTooltip
isMacroActionWithShowTooltip = C_ActionBar.IsMacroActionWithShowTooltip(actionID)
Returns whether the given action button contains a macro with an explicit #showtooltip directive.
Arguments
actionID | luaIndex |
|---|
Returns
isMacroActionWithShowTooltip | bool |
|---|
C_ActionBar.IsOnBarOrSpecialBar
isOnBarOrSpecialBar = C_ActionBar.IsOnBarOrSpecialBar(spellID, [setToSearch])
Arguments
spellID | SpellIdentifier | |
|---|---|---|
setToSearch | ActionBarSet default "All" |
Returns
isOnBarOrSpecialBar | bool |
|---|
C_ActionBar.IsPossessBarVisible
isPossessBarVisible = C_ActionBar.IsPossessBarVisible()
Returns
isPossessBarVisible | bool |
|---|
C_ActionBar.IsStackableAction
isStackableAction = C_ActionBar.IsStackableAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isStackableAction | bool |
|---|
C_ActionBar.IsUsableAction
isUsable, isLackingResources = C_ActionBar.IsUsableAction(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
isUsable | bool | |
|---|---|---|
isLackingResources | bool |
C_ActionBar.PutActionInSlot
C_ActionBar.PutActionInSlot(slotID)
Arguments
slotID | luaIndex |
|---|
C_ActionBar.RegisterActionUIButton
C_ActionBar.RegisterActionUIButton(checkboxFrame, actionID, cooldownFrame)
Arguments
checkboxFrame | SimpleCheckbox | |
|---|---|---|
actionID | luaIndex | |
cooldownFrame | CooldownFrame |
C_ActionBar.SetActionBarPage
C_ActionBar.SetActionBarPage(pageIndex)
Arguments
pageIndex | luaIndex |
|---|
C_ActionBar.ShouldOverrideBarShowHealthBar
showHealthBar = C_ActionBar.ShouldOverrideBarShowHealthBar()
Returns
showHealthBar | bool |
|---|
C_ActionBar.ShouldOverrideBarShowManaBar
showManaBar = C_ActionBar.ShouldOverrideBarShowManaBar()
Returns
showManaBar | bool |
|---|
C_ActionBar.ShouldShowKeyring
isKeyringEnabled = C_ActionBar.ShouldShowKeyring()
Returns
isKeyringEnabled | bool |
|---|
C_ActionBar.ToggleAutoCastPetAction
C_ActionBar.ToggleAutoCastPetAction(slotID)
Arguments
slotID | luaIndex |
|---|
C_ActionBar.UnregisterActionUIButton
C_ActionBar.UnregisterActionUIButton(checkboxFrame)
Arguments
checkboxFrame | SimpleCheckbox |
|---|
C_ActionBar.UsesActionText
usesActionText = C_ActionBar.UsesActionText(actionID)
Arguments
actionID | luaIndex |
|---|
Returns
usesActionText | bool |
|---|
Events
ACTION_RANGE_CHECK_UPDATE
Used in conjunction with EnableActionRangeCheck to inform the UI when an action goes in or out of range with its current target.
slot | luaIndex | |
|---|---|---|
isInRange | bool | Whether or not the current target is in range of the action. Should not be used if the 'checksRange' parameter is false. |
checksRange | bool | Can be false if a range check was not made for any reason, for example there is not a current target. |
ACTION_USABLE_CHANGED
changes | ActionUsableState[] |
|---|
ACTIONBAR_HIDEGRID
No payload.
ACTIONBAR_PAGE_CHANGED
No payload.
ACTIONBAR_SHOW_BOTTOMLEFT
No payload.
ACTIONBAR_SHOWGRID
No payload.
ACTIONBAR_SLOT_CHANGED
slot | number |
|---|
ACTIONBAR_UPDATE_COOLDOWN
No payload.
ACTIONBAR_UPDATE_STATE
No payload.
ACTIONBAR_UPDATE_USABLE
No payload.
PET_BAR_UPDATE
No payload.
UPDATE_BONUS_ACTIONBAR
No payload.
UPDATE_EXTRA_ACTIONBAR
No payload.
UPDATE_MULTI_CAST_ACTIONBAR
No payload.
UPDATE_OVERRIDE_ACTIONBAR
No payload.
Tables
Enum.ActionBarSet enumeration
None | 0 |
|---|---|
Mkb | 1 |
Gamepad | 2 |
All | 3 |