WoW:API UnitStat

Revision as of 22:56, 15 January 2005 by WoWWiki>Geekgirljess
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
UnitStat -Documentation by geekgirljess-
base, stat, posBuff, negBuff = UnitStat("unit", statID);

Returns info about one of the unit's stats (strength, agility, stamina, intellect, spirit).


Arguments
unit
String - The UnitId to get information from. (Likely only works for "player" and "pet" -- unconfirmed)
statID
Number - An internal id corresponding to one of the stats. (1-5)

Returns
base, stat, posBuff, negBuff
base
Number - The unit's base stat.
stat
Number - The unit's current stat.
posBuff
Number - Any positive buffs applied to the stat.
negBuff
Number - Any negative buffs applied to the stat.

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

Template:WoW API