Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API UnitClassification

From Wowpedia
Jump to: navigation, search

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

classification = UnitClassification("unit")

Arguments

unit 
String - unitId of the unit to query, e.g. "target"

Returns

classification 
String - the unit's classification: "worldboss", "rareelite", "elite", "rare", "normal", "trivial", or "minus"

Note that "trivial" is for low-level targets that would not reward experience or honor (UnitIsTrivial() would return '1'), whereas "minus" is for mobs that show a miniature version of the v-key health plates.

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.

Patch changes

Mists of Pandaria Patch 5.0.4 (2012-08-28): "minus" classification added; used for minion mobs that typically have less health than normal mobs of their level, but engage the player in larger numbers.