API UnitStat

Returns info about one of the unit's stats (strength, agility, stamina, intellect, spirit). stat, effectiveStat, posBuff, negBuff = UnitStat("unit", statID);

Arguments

 * unit : String - The UnitId to get information from. (Only works for  and  . Will work on   as long as it is equal to  )
 * statID :Number - An internal id corresponding to one of the stats.
 * Strength
 * Agility
 * Stamina
 * Intellect
 * Spirit (not anymore available in 9.0.5)

Return

 * stat : Number - The unit's stat. Seems to always return the same as effectiveStat, regardless of values of pos/negBuff.
 * effectiveStat : Number - The unit's current stat, as displayed in the paper doll frame.
 * posBuff : Number - Any positive buffs applied to the stat. Including gear.
 * negBuff : Number - Any negative buffs applied to the stat.

Example
local stat, effectiveStat, posBuff, negBuff = UnitStat("player",1); DEFAULT_CHAT_FRAME:AddMessage("Your current Strength is ".. stat);

Result
A chat message stating your current strength is displayed