Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns an ordered list of auras used with UnitAuraBySlot()
continuationToken, ... = UnitAuraSlots(unit [, filter, maxSlots, continuationToken])
Arguments[]
Returns[]
- continuationToken
- number? - Indicates that maxSlots was reached.
- ...
- number - A batch of slots used with UnitAuraBySlot()
Details[]
It's recommended to just use AuraUtil.ForEachAura() instead of UnitAuraBySlot()
& UnitAuraSlots()
as it'll "do the right thing". Note that this API is not available on Classic.
2022-08-25 | Meorawr @ Discord
With UnitAura the
index
parameter is a relative index into a list of auras specified by the filter
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:
- Doesn't return just one aura slot.
- 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.
Patch changes[]
Patch 8.2.5 (2019-09-24): Added.
|