ESODecoded

GetAbilityCost

ESO Lua API function — used by 32 of the 3,030 addons we indexed (combined 13,305,500 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetAbilityCost(integer abilityId, [CombatMechanicFlags|#CombatMechanicFlags] mechanicFlag, integer:nilable overrideRank, string casterUnitTag)

Returns: integer cost

Real usage — from LibCombat

			then
				newData[powerType] = GetAbilityCost(abilityId, powerType, nil, "player") -- add cost over time ??
				lastPowerType = powerType

Short excerpt from the shipping addon LibCombatits 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
LibCombat5,017,654
HodorReflexes - DPS & ULT tracker3,446,840
RaidNotifier Updated2,789,746
LibFoodDrinkBuff373,970
Caro's Skill Point Saver (Respec Skill Lines, Champion Points, Gear, Quickslots, Appearances)364,055
Bandits Gear Manager306,643