Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API UnitInRange
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__ <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Returns 1 if the unit is in range of most helpful spells (40yds) and in a group / raid with you, otherwise nil. <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> isTrue = UnitInRange("unit") == Arguments == <!-- List each argument, together with its type --> ;unit : String - [[unitId]] to check. == Returns == <!-- List each return value, together with its type --> ;isTrue : 1 or nil == Example == <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> if UnitInRange("target") then print(UnitName("target") .. " is 40 yds away.") else print(UnitName("target") .. " is not in range!") end ====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. --> ''FarfarawayDPS'' is 40 yds away. ''FarfarawayDPS'' is not in range! ==Details== <!-- Details not appropriate for the main description can go here. REMOVE the section if you're just going to restate the intro line! --> : Returns 'false' for any unit not in party or raid. : Will return nil for hostile units. ==See also== * [[API IsSpellInRange]]
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
)