WoW API: UnitCreatureFamily

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UnitCreatureFamily to API UnitCreatureFamily without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitCreatureFamily

Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"), or nil if the unit does not have a creature family (e.g. because it is not a creature).

creatureFamily = UnitCreatureFamily(unit);

Parameters[edit]

Arguments[edit]

unit
UnitId - unit you wish to query.

Returns[edit]

creatureFamily
String - localized name of the creature family (e.g., "Crab" or "Wolf"). Possible English values are:

Bat
Bear
Bird of Prey
Boar
Carrion Bird
Cat
Chimaera
Core Hound

Crab
Crocolisk
Devilsaur
Doomguard
Dragonhawk
Felguard
Felhunter
Ghoul

Gorilla
Hyena
Imp
Moth
Nether Ray
Raptor
Ravager
Remote Control

Rhino
Scorpid
Serpent
Silithid
Spider
Spirit Beast
Sporebat
Succubus

Tallstrider
Turtle
Voidwalker
Warp Stalker
Wasp
Wind Serpent
Wolf
Worm

Example[edit]

if ( UnitCreatureFamily("target") == "Bear" ) then
 message("It's a godless killing machine! Run for your lives!");
end

Result[edit]

Displays a message if the target is a type of bear.