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 UnitCreatureFamily

From Wowpedia
Jump to: navigation, search

Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"). Only works on Beasts and Demons, since the family's only function is to determine what abilities the unit will have if a hunter or warlock tames it; however, works on most currently untameable Beasts for reasons of backward and forward compatibility. Returns nil if the creature isn't a Beast or doesn't belong to a family that includes a tameable creature.

creatureFamily = UnitCreatureFamily(unit);

Parameters

Arguments

unit 
UnitId - unit you wish to query.

Returns

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

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

Result

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