ESODecoded

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) then

Short excerpt from the shipping addon Code's Combat Alertsits 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
Code's Combat Alerts4,445,158
HodorReflexes - DPS & ULT tracker3,446,840
RaidNotifier Updated2,789,746
Provision's TeamFormation : Teammate Radar1,506,270
Azurah - Interface Enhanced1,462,318
Foundry Tactical Combat (FTC)1,097,601