WoW:API UnitArmor: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
<center>'''UnitArmor''' ''-Documentation by [[user:danboo|danboo]]-''</center>
{{wowapi}}
 
Returns the armor statistics relevant to the specified target.
Returns the armor statistics relevant to the specified target.


Line 7: Line 6:
----
----
;''Arguments''
;''Arguments''
 
:
:("unit")
 
:;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.)
:;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 24: Line 21:
----
----
;''Example''
;''Example''
  local base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);
  local base, effectiveArmor, armor, posBuff, negBuff = UnitArmor("player");
message("Your current armor is " .. effectiveArmor .. " (base is " .. baseArmor .. ")");


;''Result''
;''Result''
 
: Message box appears displaying the current and base armor values of your character.
----
;''Description''
 
: Returns the armor statistics relevant to the specified target.
 
----
{{WoW API}}