WoW API < UnitThreatSituation

Returns brief information about a unit's standing in another unit's threat table. Added in Patch 3.0.

status = UnitThreatSituation("unit"[, "otherunit"])

Parameters Edit

Arguments Edit

string - the unit token of the unit whose threat to query (e.g. "player", "party2", "pet", etc.)
string (optional) - the unit token of the unit whose threat table to query (e.g. "target", "pettarget" etc.)

Returns Edit

integer - returns the threat status for the unit:
With otherunit specified
  • nil = unit is not on otherunit's threat table.
  • 0 = not tanking, lower threat than tank.
  • 1 = not tanking, higher threat than tank.
  • 2 = insecurely tanking, another unit have higher threat but not tanking.
  • 3 = securely tanking, highest threat
Without otherunit specified
  • nil = unit is not on any other unit's threat table.
  • 0 = not tanking anything.
  • 1 = not tanking anything, but have higher threat than tank on at least one unit.
  • 2 = insecurely tanking at least one unit, but not securely tanking anything.
  • 3 = securely tanking at least one unit.

Example Edit

local status, statustxts = UnitThreatSituation("player", "target"), { "low on threat",  "overnuking", "losing threat", "tanking securely" }
print("You are " .. statustxts[status + 1] .. ".")

Result Edit

Prints a description of the player's threat situation to the chat frame. e.g.

You are overnuking.

Details Edit

  • This function will return nil if the unit is not on the second unit's threat list, or if either unit isn't available.

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.