WoW:API UnitIsPlusMob: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Initial explanation)
m (Move page script moved page API UnitIsPlusMob to API UnitIsPlusMob without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
UnitIsPlusMob("target") will return 1 if it is an elite mob or nothing if it is a normal mob
{{wowapi}}
<center>'''LoadAddOn''' - ''Documentation by Iznobad''</center>
UnitIsPlusMob("unit") will return 1 if it is an elite mob or nothing if it is a normal mob


Check whether a mob is elite
Check whether a mob is elite


  isElite = UnitIsPlusMob("target")
  isElite = UnitIsPlusMob("unit")


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:;target : String - indicates who to chekc for elite status. Basically only "target" makes sense, since only mobs can be elite
:;target : String - indicates who to check for elite status.


=== Returns ===
=== Returns ===
Line 14: Line 14:
=== Usage ===
=== Usage ===
  local isElite = UnitIsPlusMob("target")
  local isElite = UnitIsPlusMob("target")
   if ( isElite ) then
   if isElite then
     -- run away code
     -- run away code
   else
   else
Line 22: Line 22:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}

Latest revision as of 04:47, 15 August 2023

WoW API < UnitIsPlusMob

UnitIsPlusMob("unit") will return 1 if it is an elite mob or nothing if it is a normal mob

Check whether a mob is elite

isElite = UnitIsPlusMob("unit")

Parameters[edit]

Arguments[edit]

target
String - indicates who to check for elite status.

Returns[edit]

isElite
Flag - Indicates if the mob is elite, 1 if it is, nil if it is not.

Usage[edit]

local isElite = UnitIsPlusMob("target")
 if isElite then
    -- run away code
 else
    -- cast a nasty spell on the mob
 end