UnitArmor

From Warcraft Wiki
Jump to navigation Jump to search

Returns the armor stats for the unit.

base, effectiveArmor, armor, bonusArmor       = UnitArmor(unit) -- retail
base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit) -- classic

Arguments

unit
string : UnitToken - Only works for "player" and "pet". Works for "target" with Hunter's Beast Lore.

Returns

base
number - The unit's base armor.
effectiveArmor
number - The unit's effective armor.
armor
number

Retail

bonusArmor
number

Classic

posBuff
number - Amount of armor increase due to positive buffs
negBuff
number - Amount of armor reduction due to negative buffs (a negative number)

Example

local base, effectiveArmor = UnitArmor("player")
print(format("Your current armor is %d (%d base)", effectiveArmor, base))