GetPlayerStat
ESO Lua API function — used by 46 of the 3,030 addons we indexed (combined 6,511,276 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetPlayerStat([DerivedStats|#DerivedStats] derivedStat, [StatBonusOption|#StatBonusOption] statBonusOption)Returns: integer value
Real usage — from LibCombat
local function GetStat(stat) -- helper function to make code shorter
return GetPlayerStat(stat, STAT_BONUS_OPTION_APPLY_BONUS)
endShort 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 |
| Greyskull : Weapon / Spell Damage Meter | 322,434 |
| Constellations | 277,088 |
| ESO-Database.com Export AddOn | 272,910 |
| BSCs-AdvancedSynergy | 108,129 |
| Omni Stats | 49,188 |