WoW:API UnitArmor: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
:("unit")
:("unit")


:;unit : String - The [[API TYPE UnitId|UnitId]] to get information from. (Only seems to work for <tt>"player"</tt> and <tt>"pet"</tt>)
:;unit : String - The [[API TYPE UnitId|UnitId]] to get information from. (Only seems to work for <tt>"player"</tt> and <tt>"pet"</tt>) (Also works for "target" if that is a beast on which the player has cast Beast Lore.)


----
----
Line 16: Line 16:


:base, effectiveArmor, armor, posBuff, negBuff
:base, effectiveArmor, armor, posBuff, negBuff
:;base : Number - The unit's base armor without buffs
:;base : Number - The unit's base armor without buffs, armor kits or enchantments.
:;effectiveArmor : Number - The unit's effective armor after buffs (and ??)
:;effectiveArmor : Number - The unit's effective armor after buffs (and ??)
:;armor : Number - Dont know what the difference between this and effectiveArmor is.
:;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
:;posBuff : Number - Amount of armor increase due to positive buffs
:;negBuff : Number - Amount of armor reduction due to negative buffs (a negative number)
:;negBuff : Number - Amount of armor reduction due to negative buffs (a negative number)

Revision as of 07:21, 18 February 2006

UnitArmor -Documentation by danboo-

Returns the armor statistics relevant to the specified target.

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

Arguments
("unit")
unit
String - The UnitId to get information from. (Only seems to work for "player" and "pet") (Also works for "target" if that is a beast on which the player has cast Beast Lore.)

Returns
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
local base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);
Result

Description
Returns the armor statistics relevant to the specified target.

Template:WoW API