WoW:API UnitResistance: Difference between revisions
No edit summary |
(upgraded deprecated template) |
||
Line 1: | Line 1: | ||
{{wowapi}} | |||
With no parameters it appears to return a value describing the '''base''' resistance to physical or magical damage. | With no parameters it appears to return a value describing the '''base''' resistance to physical or magical damage. | ||
Line 45: | Line 46: | ||
/script A,B,C,D = UnitResistance("player",0)); SendChatMessage("My total armor is "..B); | /script A,B,C,D = UnitResistance("player",0)); SendChatMessage("My total armor is "..B); | ||
Revision as of 17:26, 6 January 2007
With no parameters it appears to return a value describing the base resistance to physical or magical damage.
Returns: base, total, bonus, malus
Base - base value without any gear worn
total - current total value
bonus - benefit gained from gear and benefitial spells (added to base this equals total)
malus - what you loose from various debuffs, or negative-resistance items
Arguments
"Unit" The unit to be evaluated (appears to only work on "player")
"resistanceIndex" Number defining resistance type.
0 - (Physical) - Armor rating
1 - (Holy)
2 - (Fire)
3 - (Nature)
4 - (Frost)
5 - (Shadow)
6 - (Arcane)
Example
/script SendChatMessage("My base armor is ".. UnitResistance("player", 0));
/script A,B,C,D = UnitResistance("player",0)); SendChatMessage("My total armor is "..B);