Seahen50605@legacy41570005 (talk | contribs) mNo edit summary |
Seahen50605@legacy41570005 (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ |
{{wowapi}} __NOTOC__ |
||
− | Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"). Only works on Beasts, since the family's only function is to determine what abilities the unit will have if a hunter tames it. Returns nil if the creature isn't a Beast or doesn't belong to a family that includes a tameable creature. |
+ | Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"). Only works on Beasts, since the family's only function is to determine what abilities the unit will have if a hunter 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); |
creatureFamily = UnitCreatureFamily(unit); |
||
Revision as of 14:14, 13 August 2011
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"). Only works on Beasts, since the family's only function is to determine what abilities the unit will have if a hunter 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 |
Crab |
Gorilla |
Rhino |
Tallstrider |
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.