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 = powerTypeShort excerpt from the shipping addon LibCombat — 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 |
|---|---|
| LibCombat | 5,017,654 |
| HodorReflexes - DPS & ULT tracker | 3,446,840 |
| RaidNotifier Updated | 2,789,746 |
| LibFoodDrinkBuff | 373,970 |
| Caro's Skill Point Saver (Respec Skill Lines, Champion Points, Gear, Quickslots, Appearances) | 364,055 |
| Bandits Gear Manager | 306,643 |