WoW:API UnitResistance: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
Appears to return a value describing the '''base''' resistance to physical or magical damage.  Does ''not'' count additional resistance provided by buffs, etc.
With no parameters it appears to return a value describing the '''base''' resistance to physical or magical damage.   


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Returns: base, total, bonus, unknown
Base - base value without any gear worn
total - current total value
bonus - benefit gained from gear (added to base this equals total)
unknown - fourth parameter returned - unknown (guessing this is a debuff tally??)


Arguments
Arguments
Line 11: Line 24:
Number defining resistance type.
Number defining resistance type.


0 - Armor rating
0 - (Physical) - Armor rating


1 - (unknown type)  
1 - (Holy)  


2 - (Fire)
2 - (Fire)
Line 29: Line 42:
Example  
Example  


/script SendChatMessage("My base armor is ".. UnitResistance("player", 0))
/script SendChatMessage("My base armor is ".. UnitResistance("player", 0));
end;
 
/script A,B,C,D = UnitResistance("player",0)); SendChatMessage("My total armor is "..B);
Anonymous user