Returns information about the player's or pet's magic resistance


See also Stat information functions.

Signature:

base, resistance, positive, negative = UnitResistance("unit", resistanceIndex)

Arguments:

  • unit - A unit to query; only valid for player or pet (string, unitID)
  • resistanceIndex - Index of a magic resistance type (number)
    • 1 - Fire
    • 2 - Nature
    • 3 - Frost
    • 4 - Shadow
    • 5 - Arcane

Returns:

  • base - Base resistance value (generally 0) (number)
  • resistance - Current resistance value (including modifiers (number)
  • positive - Positive resistance modifiers (number)
  • negative - Negative resistance modifiers (number)