Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the armor statistics relevant to the specified target.
base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);
Arguments
- unit
- string - The unitId to get information from. Normally only works for
"player"
and"pet"
, but also for "target" if the target is a beast upon which the hunter player has cast Beast Lore.
Returns
- baselineArmor
- number - The unit's base armor without buffs, armor kits or enchantments.
- effectiveArmor
- number - The unit's effective armor after buffs.
- armor
- number - The unit's armor after adding armor kits and enchantments but without buffs.
- bonusArmor
- number - Amount of armor increase due to positive buffs
Example
local baseArmor , effectiveArmor, armor, posBuff, negBuff = UnitArmor("player");
DEFAULT_CHAT_FRAME:AddMessage(("Your current armor is " .. effectiveArmor .. " (base is " .. baseArmor .. ")");
External links
- GitHub FrameXML, Gethe
- Globe "wut?" Tool, Townlong-Yak