WoW API: UnitCreatureType
Jump to navigation
Jump to search
Returns the creature type of the specified unit.
creatureType = UnitCreatureType(unit)
Arguments
- unit
- string - the UnitId to query
Returns
- creatureType
- string - the localized creature type of the unit
Examples
print(UnitCreatureType("target"))
Result
- Prints the target's creature type to the chat frame.
Notes
- 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.