Lore archive · Warcraft Wiki, 2023 dump
API UnitStat
Last wiki revision 2022-07-26
Returns the basic attributes for a unit (strength, agility, stamina, intellect). stat, effectiveStat, posBuff, negBuff = UnitStat(unit, statID)
- unit: : UnitId - Only works for and . Will work on as long as it is equal to )
- statID: - An internal id corresponding to one of the stats.
- Strength
- Agility
- Stamina
- Intellect
- Spirit (not anymore available in 9.0.5)
- stat: - The unit's stat. Seems to always return the same as effectiveStat, regardless of values of pos/negBuff.
- effectiveStat: - The unit's current stat, as displayed in the paper doll frame.
- posBuff: - Any positive buffs applied to the stat. Including gear.
- negBuff: - 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
Source
https://warcraft.wiki.gg/wiki/API_UnitStat · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.