WoW:API UnitClassification: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 16: Line 16:


:classification
:classification
:;classification : a string representing the classification (e.g., "worldboss", "rareelite", "elite" or "rare")
:;classification : a string representing the classification ("worldboss", "rareelite", "elite", "rare" or "normal")


----
----

Revision as of 12:40, 5 May 2005

UnitClassification -Documentation by danboo-

Returns the classification of the specified unit (e.g., "elite" or "worldboss").

local classification = UnitClassification(unit);

Arguments
(String unit)
unit
the unit name (e.g., "target")

Returns
classification
classification
a string representing the classification ("worldboss", "rareelite", "elite", "rare" or "normal")

Example
 if ( UnitClassification("target") == "worldboss" ) then
   -- If unit is a world boss show skull regardless of level
   TargetLevelText:Hide();
   TargetHighLevelTexture:Show();
  end
Result

If the target is a world boss, then the level isn't shown in the target frame, instead a special high level texture is shown.


Description
Returns the classification of the specified unit (e.g., "elite" or "worldboss").

Template:WoW API