WoW API: UnitArmor

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UnitArmor to API UnitArmor without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitArmor

Returns the armor statistics relevant to the specified target.

base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);

Parameters[edit]

Arguments[edit]

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[edit]

base, effectiveArmor, armor, posBuff, negBuff
base
Number - The unit's base armor without buffs, armor kits or enchantments.
effectiveArmor
Number - The unit's effective armor after buffs (and ??)
armor
Number - The unit's armor after adding armor kits and enchantments but without buffs.
posBuff
Number - Amount of armor increase due to positive buffs
negBuff
Number - Amount of armor reduction due to negative buffs (a negative number)

Example[edit]

local baseArmor , effectiveArmor, armor, posBuff, negBuff = UnitArmor("player");
message("Your current armor is " .. effectiveArmor .. " (base is " .. baseArmor .. ")");