(isFavorite return) |
m (→Arguments) Tag: WoW API docs |
||
(10 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} |
{{wowapi}} |
||
Returns information about a battle pet. |
Returns information about a battle pet. |
||
− | speciesID, customName, level, xp, maxXp, displayID, isFavorite, name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique = C_PetJournal.GetPetInfoByPetID(petID) |
+ | speciesID, customName, level, xp, maxXp, displayID, isFavorite, name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique, obtainable = C_PetJournal.GetPetInfoByPetID("petID") |
== Arguments == |
== Arguments == |
||
+ | ;petID : <span class="apitype">string</span> : [[GUID#BattlePet|GUID]] |
||
− | ;petID : Number - Unique identifier for this specific pet |
||
== Returns == |
== Returns == |
||
+ | {| class="darktable zebra" |
||
⚫ | |||
+ | !Index!!Value!!Type!!Details |
||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
+ | |18||obtainable||Boolean||True if this pet can be obtained, false otherwise (only false for tamer pets and developer/test pets). |
||
+ | |- |
||
+ | |} |
||
+ | |||
+ | == Details == |
||
+ | * Information about the player's battle pets is available after {{api|t=e|UPDATE_SUMMONPETS_ACTION}} has fired. |
||
== Patch history == |
== Patch history == |
||
− | {{Patch 5. |
+ | * {{Patch 5.2.0|note=Added 18th return value, "obtainable".}} |
− | {{Patch 5. |
+ | * {{Patch 5.1.0|note=Added isFavorite return value.}} |
+ | * {{Patch 5.0.4|note=Added.}} |
||
− | == See |
+ | == See also == |
− | * {{api|C_PetJournal. |
+ | * {{api|C_PetJournal.GetPetStats}} |
+ | * {{api|C_PetJournal.GetPetInfoBySpeciesID}} |
Revision as of 10:06, 9 September 2021
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns information about a battle pet.
speciesID, customName, level, xp, maxXp, displayID, isFavorite, name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique, obtainable = C_PetJournal.GetPetInfoByPetID("petID")
Arguments
- petID
- string : GUID
Returns
Index | Value | Type | Details |
---|---|---|---|
1 | speciesID | Number | Identifier for the pet species |
2 | customName | String | Name assigned by the player or nil if unnamed |
3 | level | Number | The pet's current battle level |
4 | xp | Number | The pet's current xp |
5 | maxXp | Number | The pet's maximum xp |
6 | displayID | Number | The display ID of the pet |
7 | isFavorite | Boolean | Whether the pet is marked as a favorite |
8 | name | String | Name of the pet species ("Albino Snake", "Blue Mini Jouster", etc.) |
9 | icon | String | Full path for the species' icon |
10 | petType | Number | Index of the species' pet type |
11 | creatureID | Number | NPC ID for the summoned companion pet |
12 | sourceText | String | Section of the tooltip that provides location information |
13 | description | String | Section of the tooltip that provides pet description ("flavor text") |
14 | 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. |
15 | canBattle | Boolean | True if this pet can be used in battles, false otherwise. |
16 | tradable | Boolean | True if this pet can be traded, false otherwise. |
17 | unique | Boolean | True if this pet is unique, false otherwise. |
18 | obtainable | Boolean | True if this pet can be obtained, false otherwise (only false for tamer pets and developer/test pets). |
Details
- Information about the player's battle pets is available after UPDATE_SUMMONPETS_ACTION has fired.
Patch history
- Patch 5.2.0 (2013-03-05): Added 18th return value, "obtainable".
- Patch 5.1.0 (2012-11-27): Added isFavorite return value.
- Patch 5.0.4 (2012-08-28): Added.