Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API UnitThreatSituation
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ Returns brief information about a unit's standing in another unit's threat table. Added in [[Patch 3.0]]. status = UnitThreatSituation("unit"[, "otherunit"]) == Parameters == === Arguments === ;unit : string - the [[API TYPE UnitId|unit token]] of the unit whose threat to query (e.g. "player", "party2", "pet", etc.) ;otherunit : string ''(optional)'' - the [[API TYPE UnitId|unit token]] of the unit whose threat table to query (e.g. "target", "pettarget" etc.) === Returns === ;status : 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 == local status, statustxts = UnitThreatSituation("player", "target"), { "low on threat", "overnuking", "losing threat", "tanking securely" } print("You are " .. statustxts[status + 1] .. ".") === Result === Prints a description of the player's threat situation to the chat frame. e.g. You are overnuking. == Details == * 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 == * [[API UnitDetailedThreatSituation]] * [[API GetThreatStatusColor]]
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)