Lore archive · Warcraft Wiki, 2023 dump
API UnitAuraBySlot
Last wiki revision 2023-06-14
Needs summary. name, icon, count, debuffType, duration, expirationTime, source, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, ... = UnitAuraBySlot(unit, slot)
- unit: : UnitId
- slot: - Aura slot from
It's recommended to just use AuraUtil.ForEachAura instead of & as it'll "do the right thing". Note that this API is not available on Classic.
<div class="darktable" style="margin: 1em auto; max-width: calc(50% + 48em); padding: 0.75em; font-size:100%"> 2022-08-25 | Meorawr @ Discord
With UnitAura the parameter is a relative index into a list of auras specified by the parameter - so assuming zero optimizations each call effectively means that the client needs to traverse over the aura list each time counting how many auras match the given filter until the index is reached.
In reality it's likely got a basic optimization in-place that allows successive calls with the same unit/filter parameter to continue, thus bypassing that search.
UnitAuraSlots "advantage" is that it:
- 1) Doesn't return just one aura slot.
- 2) It returns a continuation token marking the number of slots the API can skip on the next call - basically making that above theoretical optimization explicit.
Source
https://warcraft.wiki.gg/wiki/API_UnitAuraBySlot · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.