We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: End of Week.
Returns info about one of the unit's stats (strength, agility, stamina, intellect, spirit).
stat, effectiveStat, posBuff, negBuff = UnitStat("unit", statID);
- String - The UnitId to get information from. (Only works for "player" and "pet". Will work on "target" as long as it is equal to "player")
- Number - An internal id corresponding to one of the stats.
- Number - The unit's stat. Seems to always return the same as effectiveStat, regardless of values of pos/negBuff.
- Number - The unit's current stat, as displayed in the paper doll frame.
- Number - Any positive buffs applied to the stat. Including gear.
- Number - Any negative buffs applied to the stat.
local stat, effectiveStat, posBuff, negBuff = UnitStat("player",1); DEFAULT_CHAT_FRAME:AddMessage("Your current Strength is ".. stat);
A chat message stating your current strength is displayed