ESODecoded

GetNumBuffs

ESO Lua API function — used by 213 of the 3,030 addons we indexed (combined 36,807,939 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetNumBuffs(string unitTag)

Returns: integer numBuffs

Real usage — from Action Duration Reminder

        -- search player stack buff effects and save them in the newly saved action
        local numBuffs = GetNumBuffs('player') -- #number
        for i = 1, numBuffs do

Short excerpt from the shipping addon Action Duration Reminderits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
Action Duration Reminder6,522,011
Srendarr - Aura, Buff & Debuff Tracker5,058,870
LibCombat5,017,654
LibQuestData4,916,044
Code's Combat Alerts4,445,158
RaidNotifier Updated2,789,746