WoW:API UnitThreatSituation: Difference between revisions

m
Move page script moved page API UnitThreatSituation to WoW:API UnitThreatSituation without leaving a redirect
(slight formatting changes)
m (Move page script moved page API UnitThreatSituation to WoW:API UnitThreatSituation without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 9: Line 9:


=== Returns ===
=== Returns ===
;status : integer - returns the threat status for the unit on the second unit:
 
:* nil = unit is not on otherunit's threat table
;status : integer - returns the threat status for the unit:
:* 0 = not tanking, lower threat than tank. If otherunit is not specified this denotes "not tanking anything"
 
:* 1 = not tanking, higher threat than tank
:;With otherunit specified
:* 2 = insecurely tanking.
 
:* 3 = securely tanking. If otherunit is not specified, this denotes "tanking something"
::* 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 ==
== Example ==
Line 25: Line 37:
== Details ==
== 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.
* This function will return nil if the unit is not on the second unit's threat list, or if either unit isn't available.
* If the second argument is omitted, this function will return 3 if the unit has aggro on something, or 0 otherwise. ''Needs confirmation/additional testing.''


== See also ==
== See also ==
* [[API UnitDetailedThreatSituation]]
* [[API UnitDetailedThreatSituation]]
* [[API GetThreatStatusColor]]
* [[API GetThreatStatusColor]]
[[Category:Interface customization]]
[[Category:World of Warcraft API]]
Anonymous user