WowAddons

World of Warcraft Forever API · C_UnitAuras.md, for your AI

C_UnitAuras

38 functions, 6 events, 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_UnitAuras.AddAuraSound

auraSoundID = C_UnitAuras.AddAuraSound(trigger, sound)

Registers a sound for an aura event. The sound is stopped after five seconds of playback. The throttleSeconds value must be between 0 and 5 seconds, inclusive.

Arguments

triggerUnitAuraSoundTrigger
soundUnitAuraSoundInfo

Returns

auraSoundIDnumber may be nil

C_UnitAuras.AddBlockedAura

C_UnitAuras.AddBlockedAura(unit, auraInstanceID)

Arguments

unitUnitTokenRestrictedForAddOns
auraInstanceIDnumber

C_UnitAuras.AddPrivateAuraAnchor

anchorID = C_UnitAuras.AddPrivateAuraAnchor(args)

Arguments

argsAddPrivateAuraAnchorArgs

Returns

anchorIDnumber may be nil

C_UnitAuras.AuraIsBigDefensive

isBigDefensive = C_UnitAuras.AuraIsBigDefensive(spellID)

Arguments

spellIDSpellIdentifier

Returns

isBigDefensivebool

C_UnitAuras.AuraIsPrivate

isPrivate = C_UnitAuras.AuraIsPrivate(spellID)

Arguments

spellIDSpellIdentifier

Returns

isPrivatebool

C_UnitAuras.CancelAuraByInstanceID

C_UnitAuras.CancelAuraByInstanceID(unit, auraInstanceID)

Arguments

unitUnitTokenRestrictedForAddOns
auraInstanceIDnumber

C_UnitAuras.ClearBlockedAuras

C_UnitAuras.ClearBlockedAuras(unit)

Arguments

unitUnitTokenRestrictedForAddOns

C_UnitAuras.DoesAuraHaveExpirationTime

hasExpirationTime = C_UnitAuras.DoesAuraHaveExpirationTime(auraInstanceUnit, auraInstanceID)

Returns true if an aura instance will expire after a certain amount of time.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber

Returns

hasExpirationTimebool

C_UnitAuras.GetAuraApplicationDisplayCount

count = C_UnitAuras.GetAuraApplicationDisplayCount(auraInstanceUnit, auraInstanceID, [minDisplayCount], [maxDisplayCount])

Formats a string for displaying the number of applications an aura has present.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber
minDisplayCountnumber default 2Minimum number of applications required; if the application count is below this figure an empty string will be returned.
maxDisplayCountnumber may be nilMaximum number of applications allowed; if the application count is above this figure then the string '*' will be returned.

Returns

countstring

C_UnitAuras.GetAuraBaseDuration

newDuration = C_UnitAuras.GetAuraBaseDuration(auraInstanceUnit, auraInstanceID, [spellID])

Returns the base duration of the given spell (or aura). Takes an optional spellID to use as the new duration if that cannot be derived from the aura, if that value isn't supplied the aura's spellID will be used

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber
spellIDSpellIdentifier may be nil

Returns

newDurationnumber may be nil

C_UnitAuras.GetAuraCasterGUID

casterGUID = C_UnitAuras.GetAuraCasterGUID(auraInstanceUnit, auraInstanceID)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber

Returns

casterGUIDWOWGUID may be nil

C_UnitAuras.GetAuraDataByAuraInstanceID

aura = C_UnitAuras.GetAuraDataByAuraInstanceID(unit, auraInstanceID)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
auraInstanceIDnumber

Returns

auraAuraData may be nil

C_UnitAuras.GetAuraDataByIndex

aura = C_UnitAuras.GetAuraDataByIndex(unit, index, [filter])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
indexluaIndex
filterAuraFilters may be nil

Returns

auraAuraData may be nil

C_UnitAuras.GetAuraDataBySlot

aura = C_UnitAuras.GetAuraDataBySlot(unit, slot)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
slotnumber

Returns

auraAuraData may be nil

C_UnitAuras.GetAuraDataBySpellName

aura = C_UnitAuras.GetAuraDataBySpellName(unit, spellName, [filter])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
spellNamecstring
filterAuraFilters may be nil

Returns

auraAuraData may be nil

C_UnitAuras.GetAuraDispelTypeColor

dispelTypeColor = C_UnitAuras.GetAuraDispelTypeColor(auraInstanceUnit, auraInstanceID, curve)

Queries the dispel type associated with an aura instance and remaps it to a color via a curve, with the dispel type ID used as the 'x' value.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber
curveLuaColorCurveObject

Returns

dispelTypeColorcolorRGBA

C_UnitAuras.GetAuraDuration

duration = C_UnitAuras.GetAuraDuration(auraInstanceUnit, auraInstanceID)

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber

Returns

durationLuaDurationObject

C_UnitAuras.GetAuraSlots

outContinuationToken, slots = C_UnitAuras.GetAuraSlots(unit, [filter], [maxSlots], [continuationToken])

Arguments

unitUnitTokenRestrictedForAddOns
filterAuraFilters may be nil
maxSlotsnumber may be nil
continuationTokennumber may be nil

Returns

outContinuationTokennumber may be nil
slotsnumber

C_UnitAuras.GetBuffDataByIndex

aura = C_UnitAuras.GetBuffDataByIndex(unit, index, [filter])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
indexluaIndex
filterAuraFilters may be nil

Returns

auraAuraData may be nil

C_UnitAuras.GetCooldownAuraBySpellID

cooldownSpellID = C_UnitAuras.GetCooldownAuraBySpellID(spellID)

Arguments

spellIDSpellIdentifier

Returns

cooldownSpellIDnumber may be nil

C_UnitAuras.GetDebuffDataByIndex

aura = C_UnitAuras.GetDebuffDataByIndex(unit, index, [filter])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
indexluaIndex
filterAuraFilters may be nil

Returns

auraAuraData may be nil

C_UnitAuras.GetGroupBuffVisualAlerts

visualAlerts = C_UnitAuras.GetGroupBuffVisualAlerts()

Returns the alerts passed to SetGroupBuffVisualAlerts plus an entry for every linked rank spell of those group buffs.

Returns

visualAlertsGroupBuffVisualAlertInfo[]

C_UnitAuras.GetHiddenGroupBuffs

spellIDs = C_UnitAuras.GetHiddenGroupBuffs()

Returns the spell IDs passed to SetHiddenGroupBuffs plus every linked rank spell of those group buffs.

Returns

spellIDsnumber[]

C_UnitAuras.GetPlayerAuraBySpellID

aura = C_UnitAuras.GetPlayerAuraBySpellID(spellID)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

spellIDSpellIdentifier

Returns

auraAuraData may be nil

C_UnitAuras.GetRefreshCarryOverDuration

newDuration = C_UnitAuras.GetRefreshCarryOverDuration(auraInstanceUnit, auraInstanceID, [spellID])

Returns the client-predicted amount of time that a new spellcast of the same spell would carry over to the new application of that aura. Takes an optional spellID to use as the new duration if that cannot be derived from the aura, if that value isn't supplied the aura's spellID will be used

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber
spellIDSpellIdentifier may be nil

Returns

newDurationnumber may be nil

C_UnitAuras.GetRefreshExtendedDuration

newDuration = C_UnitAuras.GetRefreshExtendedDuration(auraInstanceUnit, auraInstanceID, [spellID])

Returns the client-predicted new duration of this aura if it were cast again right now. Takes an optional spellID to use as the new duration if that cannot be derived from the aura, if that value isn't supplied the aura's spellID will be used

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

auraInstanceUnitUnitToken
auraInstanceIDnumber
spellIDSpellIdentifier may be nil

Returns

newDurationnumber may be nil

C_UnitAuras.GetUnitAuraBySpellID

aura = C_UnitAuras.GetUnitAuraBySpellID(unit, spellID)

Returns the first instance of an aura on a unit matching a given spell ID. Returns nil if no such aura is found. Additionally can return nil if querying a unit that is not visible (eg. party members on other maps).

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

unitUnitTokenRestrictedForAddOns
spellIDSpellIdentifier

Returns

auraAuraData may be nil

C_UnitAuras.GetUnitAuraInstanceIDs

auraInstanceIDs = C_UnitAuras.GetUnitAuraInstanceIDs(unit, filter, [maxCount], [sortRule], [sortDirection])

Arguments

unitUnitTokenRestrictedForAddOns
filterAuraFilters
maxCountnumber may be nil
sortRuleUnitAuraSortRule default "Unsorted"
sortDirectionUnitAuraSortDirection default "Normal"

Returns

auraInstanceIDsnumber[]

C_UnitAuras.GetUnitAuras

auras = C_UnitAuras.GetUnitAuras(unit, filter, [maxCount], [sortRule], [sortDirection])

Arguments

unitUnitTokenRestrictedForAddOns
filterAuraFilters
maxCountnumber may be nil
sortRuleUnitAuraSortRule default "Unsorted"
sortDirectionUnitAuraSortDirection default "Normal"

Returns

aurasAuraData[]

C_UnitAuras.IsAuraFilteredOutByInstanceID

isFiltered = C_UnitAuras.IsAuraFilteredOutByInstanceID(unit, auraInstanceID, filter)

Arguments

unitUnitTokenRestrictedForAddOns
auraInstanceIDnumber
filterAuraFilters

Returns

isFilteredbool

C_UnitAuras.RemoveAuraSound

C_UnitAuras.RemoveAuraSound(auraSoundID)

Arguments

auraSoundIDnumber

C_UnitAuras.RemovePrivateAuraAnchor

C_UnitAuras.RemovePrivateAuraAnchor(anchorID)

Arguments

anchorIDnumber

C_UnitAuras.ResetAuraDataProvider

C_UnitAuras.ResetAuraDataProvider()

C_UnitAuras.SetGroupBuffVisualAlerts

C_UnitAuras.SetGroupBuffVisualAlerts(visualAlerts)

Arguments

visualAlertsGroupBuffVisualAlertInfo[]

C_UnitAuras.SetHiddenGroupBuffs

C_UnitAuras.SetHiddenGroupBuffs(spellIDs)

Arguments

spellIDsnumber[]

C_UnitAuras.SetPrivateWarningTextAnchor

C_UnitAuras.SetPrivateWarningTextAnchor(parent, [anchor])

Arguments

parentSimpleFrame
anchorAnchorBinding may be nil

C_UnitAuras.SwitchAuraDataProvider

C_UnitAuras.SwitchAuraDataProvider()

C_UnitAuras.WantsAlteredForm

wantsAlteredForm = C_UnitAuras.WantsAlteredForm(unit)

Arguments

unitUnitToken

Returns

wantsAlteredFormbool

Events

AURA_DATA_PROVIDER_SWITCH

useRealDataProviderbool

GROUP_BUFF_VISUAL_ALERTS_CHANGED

The payload matches GetGroupBuffVisualAlerts, including linked rank spells.

visualAlertsGroupBuffVisualAlertInfo[]

HIDDEN_GROUP_BUFFS_CHANGED

The payload matches GetHiddenGroupBuffs, including linked rank spells.

spellIDsnumber[]

UNIT_AURA

unitTargetUnitTokenVariant
updateInfoUnitAuraUpdateInfo

UNIT_AURA_BLOCK_LIST_CLEARED

unitTargetUnitTokenVariant

UNIT_AURA_BLOCKED

unitTargetUnitTokenVariant
auraInstanceIDnumber

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