Returns the reaction of one unit with regards to another as a number. The returned value often (but not always) matches the unit's level of reputation with the second unit's faction, and can be used with the UnitReactionColor global table to return the color used to display a unit's reaction in the default UI.


See also Unit functions.

Signature:

reaction = UnitReaction("unit", "unit")

Arguments:

  • unit - A unit (string, unitID)
  • unit - Another unit (string, unitID)

Returns:

  • reaction - Reaction of the first unit towards the second unit (number)
    • 1 - Hated
    • 2 - Hostile
    • 3 - Unfriendly
    • 4 - Neutral
    • 5 - Friendly
    • 6 - Honored
    • 7 - Revered
    • 8 - Exalted