Wikia

WoWWiki

API UnitCreatureType

Talk1
100,552pages on
this wiki
WoW API < UnitCreatureType

Returns the creature type of the specified unit.

creatureType = UnitCreatureType(unit)

ArgumentsEdit

unit 
string - the UnitId to query

ReturnsEdit

creatureType 
string - the localized creature type of the unit

ExamplesEdit

print(UnitCreatureType("target"))

ResultEdit

Prints the target's creature type to the chat frame.

NotesEdit

  • Returns nil if the unit does not exist, or if the unit's creature type isn't available.
  • As of patch 3.0.9, the possible (English) return values are:
* Beast
* Dragonkin
* Demon
* Elemental
* Giant
* Undead
* Humanoid
* Critter
* Mechanical
* Not specified
* Totem
* Non-combat Pet
* Gas Cloud
  • The default Blizzard UI displays an empty string instead of "Not specified" for units with that creature type.
Advertisement | Your ad here

Around Wikia's network

Random Wiki