Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Retrieves information about the battle pet species taught by the specified item.
name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradeable, unique, obtainable, displayID, speciesID = C_PetJournal.GetPetInfoByItemID(itemID)
Arguments[]
- itemID
- number - an item ID
Returns[]
Index | Value | Type | Details |
---|---|---|---|
1 | name | String | Name of the pet species ("Albino Snake", "Blue Mini Jouster", etc.) |
2 | icon | String | Numeric identifier for the species' icon. |
3 | petType | Number | Index of the species' pet type. |
4 | creatureID | Number | NPC ID for the summoned companion pet. |
5 | sourceText | String | Section of the species tooltip that provides location information. |
6 | description | String | Section of the species tooltip that provides pet description ("flavor text"). |
7 | isWild | Boolean | For pets in the player's possession, true if the pet was caught in the wild. For pets not in the player's possession, true if the pet can be caught in the wild. |
8 | canBattle | Boolean | True if this pet can be used in battles, false otherwise. |
9 | tradeable | Boolean | True if this pet can be traded, false otherwise. |
10 | unique | Boolean | True if this pet is unique, false otherwise. |
11 | obtainable | Boolean | True if this pet can be obtained, false otherwise (only false for tamer pets and developer/test pets). |
12 | displayID | Number | Model display ID of the species. |
13 | speciesID | Number | ID of the species. |
Details[]
- Unlike many other item-related API functions, this function only accepts an item ID; passing an item link will raise an error. However, the item ID may be a string rather than a number.
Patch changes[]
Patch 8.1.0 (2018-12-11): Added.