GetUnitPower
ESO Lua API function — used by 199 of the 3,030 addons we indexed (combined 21,070,170 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetUnitPower(string unitTag, [CombatMechanicFlags|#CombatMechanicFlags] powerType)Returns: integer current, integer max, integer effectiveMax
Real usage — from Code's Combat Alerts
elseif (result == ACTION_RESULT_BEGIN and abilityId == CombatAlertsData.march.fireId) then
local _, _, effectiveMax = GetUnitPower("boss1", COMBAT_MECHANIC_FLAGS_HEALTH)
if (effectiveMax >= CombatAlertsData.march.hardHealth) thenShort excerpt from the shipping addon Code's Combat Alerts — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| Code's Combat Alerts | 4,445,158 |
| HodorReflexes - DPS & ULT tracker | 3,446,840 |
| RaidNotifier Updated | 2,789,746 |
| Provision's TeamFormation : Teammate Radar | 1,506,270 |
| Azurah - Interface Enhanced | 1,462,318 |
| Foundry Tactical Combat (FTC) | 1,097,601 |