Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API UnitDetailedThreatSituation
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}} <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Returns detailed information about a unit's standing in another unit's threat table. New in [[Patch 3.0]]. <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation("unit", "mob") == Parameters == === Arguments === <!-- List each argument, together with its type --> :;unit : String - The [[API TYPE UnitId|UnitId]] whose threat to query (e.g. "player", "party2", "pet", etc.) :;mob : String - The [[API TYPE UnitId|UnitId]] of the unit whose threat table to query (e.g. "target", "pettarget" etc.) === Returns === <!-- List each return value, together with its type --> :;isTanking : Boolean - returns true if the unit is primary threat target of the mob (is tanking), or false otherwise. :;status : Integer - returns the [[API TYPE ThreatStatus|threat status]] for the unit on the mob, or nil if unit is not on mob's threat table. (3 = securely tanking, 2 = insecurely tanking, 1 = not tanking but higher threat than tank, 0 = not tanking and lower threat than tank) :;threatpct : Number - returns the unit's threat on the mob as a percentage of the amount required to pull aggro, scaled according to the unit's range from the mob. At 100 the unit will pull aggro. Returns 100 if the unit is tanking and nil if the unit is not on the mob's threat list. :;rawthreatpct : Number - returns the unit's threat as a percentage of the tank's current threat. Returns nil if the unit is not on the mob's threat list. :;threatvalue : Number - returns the unit's total threat on the mob. == Example == <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> <!-- begin code --> local _,_,threatpct,_,_ = UnitDetailedThreatSituation("player", "target"); ChatFrame1:AddMessage('You are ' .. tostring(threatpct) .. '% towards aggro.'); <!-- end code --> ====Result==== <!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. --> :Prints the player's evaluated threat% to the chat frame. e.g. <!-- begin code --> You are 80.189041098141% towards aggro. <!-- end code --> ==Details== <!-- Details not appropriate for the main description can go here. REMOVE the section if you're just going to restate the intro line! --> * The function will return all nil values if the unit is not on the mob's threat list or if either unit isn't available. ==Notes== * When mobs are socially pulled (ie they aggro indirectly, as a result of another nearby mob being pulled), 'status' often sets to 0 instead of 3, despite the player having aggro. == See also == * {{api|UnitThreatSituation}}
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:Api
(
edit
)
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)