v0.13.8

C_PetJournal

namespaceavailable in: camelot

Status in wowlua

80 functions: 2 implemented, 3 recorded, 75 guessed. 15 events, 3 of them fired by the emulator on its own.

Functions

functionwhat it doesstatus
CagePetByIDPuts the pet into a cage.
not in Blizzard's documentation
guessed
ClearFanfareMarks a newly collected pet's fanfare as seen, by pet GUID. Blizzard's pet journal calls it after the pet's unwrap animation finishes. · by wowlua
not in Blizzard's documentation
guessed
ClearHoveredBattlePetClears the battle pet marked as hovered. · by wowlua
()
guessed
ClearRecentFanfaresClears the recent pet fanfares. Blizzard's pet journal calls it when it hides. · by wowlua
not in Blizzard's documentation
guessed
ClearSearchFilterClears the search box in the pet journal.
()
guessed
DismissSummonedPetDismisses the given companion pet if it is summoned. · by wowlua
(petID: string)
guessed
FindPetIDByNameReturns pet species and GUID by pet name.
not in Blizzard's documentation
guessed
GetBattlePetLinkReturns a battle pet link.
not in Blizzard's documentation
guessed
GetDisplayIDByIndexReturns one of a pet species' display IDs, or nil when there is none at that index. · by wowlua
(speciesID: number, index: number): number?
guessed
GetDisplayProbabilityByIndexReturns the chance that a pet species appears with one of its displays, or nil when there is none at that index. · by wowlua
(speciesID: number, index: number): number?
guessed
GetNonBattlePetLinkByIndexReturns a chat link for a companion pet that cannot battle, given its index in the pet journal. · by wowlua
(index: number): string
guessed
GetNumCollectedInfoReturns the number of collected battle pets of a particular species.
not in Blizzard's documentation
guessed
GetNumDisplaysReturns how many displays (appearances) a pet species has, or nil for an unknown species. · by wowlua
(speciesID: number): number?
guessed
GetNumPetSourcesReturns information about the number of pet sources.
not in Blizzard's documentation
recorded
GetNumPetTypesReturns information about the number of pet types.
not in Blizzard's documentation
guessed
GetNumPetsReturns information about the number of battle pets.
not in Blizzard's documentation
implemented
GetNumPetsInJournalReturns how many pets of the creature the player has collected and the most they can have. · by wowlua
(creatureID: number): (number, number)
guessed
GetNumPetsNeedingFanfareReturns how many collected pets still have an unopened fanfare. Blizzard's collections micro button shows an alert when the number goes up. · by wowlua
not in Blizzard's documentation
implemented
GetOwnedBattlePetStringReturns a formatted string how many of a battle pet species the player has collected.
not in Blizzard's documentation
guessed
GetOwnedPetIDsReturns the GUIDs of all pets the player owns. · by wowlua
(): string[]
guessed
GetPetAbilityInfoReturns information about a battle pet ability.
(abilityID: number): (string?, number?, number?)
guessed
GetPetAbilityListReturns pet battle abilities available to a particular battle pet species.
not in Blizzard's documentation
guessed
GetPetAbilityListTableReturns a pet species' abilities with the levels at which they are learned, or nil for an unknown species. · by wowlua
(speciesID: number): PetAbilityLevelInfo[]?
guessed
GetPetCooldownByGUIDReturns the cooldown associated with summoning a battle pet companion.
not in Blizzard's documentation
guessed
GetPetInfoByIndexReturns information about a battle pet.
not in Blizzard's documentation
recorded
GetPetInfoByItemIDRetrieves information about the battle pet species taught by the specified item.
not in Blizzard's documentation
guessed
GetPetInfoByPetIDReturns information about a battle pet.
not in Blizzard's documentation
guessed
GetPetInfoBySpeciesIDReturns information about a pet species.
not in Blizzard's documentation
guessed
GetPetInfoTableByPetIDReturns information about an owned pet, or nil when there is no such pet. · by wowlua
(petID: string): PetJournalPetInfo?
guessed
GetPetInfoTableBySpeciesIDReturns information about a pet species, or nil for an unknown species. · by wowlua
(speciesID: number): PetJournalPetInfo?
guessed
GetPetLoadOutInfoReturns information about a slot in your battle pet team.
(slot: number): (string?, number?, number?, number?, boolean?)
guessed
GetPetModelSceneInfoBySpeciesIDReturns the model scene IDs used to show a pet species: one for the pet card and one for the loadout. · by wowlua
not in Blizzard's documentation
guessed
GetPetSortParameterReturns the index of the currently active sort parameter.
not in Blizzard's documentation
guessed
GetPetStatsReturns the stats of a collected battle pet.
not in Blizzard's documentation
guessed
GetPetSummonInfoReturns whether a pet can be summoned, the error that prevents it, and the error's text. · by wowlua
(battlePetGUID: string): (boolean, PetJournalError, string)
guessed
GetPetTeamAverageLevelReturns the average level of pets in your battle pet team.
not in Blizzard's documentation
guessed
GetSearchFilterReturns the text the pet journal is filtered by. · by wowlua
(): string
guessed
GetSummonBattlePetCooldownReturns the cooldown of summoning a battle pet as start time, duration and whether it is enabled, the values CooldownFrame_Set takes. · by wowlua
not in Blizzard's documentation
recorded
GetSummonRandomFavoritePetGUIDReturns the GUID used for summoning a random favorite pet. · by wowlua
not in Blizzard's documentation
guessed
GetSummonedPetGUIDReturns information about a battle pet.
not in Blizzard's documentation
guessed
HasFavoritePetsWhether the player has marked any pet as a favorite. · by wowlua
(): boolean
guessed
IsCurrentlySummonedWhether the given pet is summoned. · by wowlua
(petID: string): boolean
guessed
IsFilterCheckedReturns true if the selected filter is checked.
not in Blizzard's documentation
guessed
IsFindBattleEnabledReturns whether the player can queue for PvP pet battles.
not in Blizzard's documentation
guessed
IsJournalReadOnlyReturns whether the pet journal can only be viewed, not changed. · by wowlua
not in Blizzard's documentation
guessed
IsJournalUnlockedReturns whether the player can change the pet journal, such as the battle pet loadout. Blizzard's journal shows its loadout as read only (PET_JOURNAL_READONLY_TEXT) when this is false. · by wowlua
not in Blizzard's documentation
guessed
IsPetSourceCheckedReturns true if the pet source is checked.
not in Blizzard's documentation
guessed
IsPetTypeCheckedReturns true if the pet type is checked.
not in Blizzard's documentation
guessed
IsUsingDefaultFiltersWhether the pet journal uses its default filters. · by wowlua
(): boolean
guessed
PetCanBeReleasedReturns true if you can release the pet.
not in Blizzard's documentation
guessed
PetIsCapturableReturns whether a battle pet in your collection is capturable (i.e. a wild pet).
not in Blizzard's documentation
guessed
PetIsFavoriteReturns true if the collected battle pet is favorited.
not in Blizzard's documentation
guessed
PetIsHurtReturns whether the specified battle pet is injured and unable to participate in battles.
not in Blizzard's documentation
guessed
PetIsLockedForConvertReturns whether a pet, by GUID, is locked because it is being converted. Blizzard's pet menu leaves out the summon option for such pets. · by wowlua
not in Blizzard's documentation
guessed
PetIsRevokedReturns whether or not the pet is revoked.
not in Blizzard's documentation
guessed
PetIsSlottedReturns whether a battle pet in your collection is part of your current battle pet team.
not in Blizzard's documentation
guessed
PetIsSummonableReturns true if you can summon this pet.
(battlePetGUID: string): boolean
guessed
PetIsTradableReturns whether or not a pet from the Pet Journal is tradable.
not in Blizzard's documentation
guessed
PetIsUsableReturns whether the player can use a pet, by GUID. · by wowlua
not in Blizzard's documentation
guessed
PetNeedsFanfareReturns whether a newly collected pet, by GUID, still has its fanfare to show. Blizzard's pet journal shows it wrapped until it is opened. · by wowlua
not in Blizzard's documentation
guessed
PetUsesRandomDisplayWhether a pet species appears with a random display when summoned, or nil for an unknown species. · by wowlua
(speciesID: number): boolean?
guessed
PickupPetPlaces a battle pet onto the mouse cursor.
not in Blizzard's documentation
guessed
PickupSummonRandomPetPuts the summon random pet action on the cursor, to place on an action bar. Blizzard's pet journal calls it when its random pet button is dragged. · by wowlua
not in Blizzard's documentation
guessed
ReleasePetByIDReleases the pet.
not in Blizzard's documentation
guessed
SetAbilitySelects a battle pet ability to make available in battle.
not in Blizzard's documentation
guessed
SetAllPetSourcesCheckedSets or clears all the pet sources in the filter menu.
not in Blizzard's documentation
guessed
SetAllPetTypesCheckedSets or clears all the pet types in the filter menu.
not in Blizzard's documentation
guessed
SetCustomNameSets a custom name for the pet.
not in Blizzard's documentation
guessed
SetDefaultFiltersResets the pet journal's filters to their defaults. · by wowlua
()
guessed
SetFavoriteSets (or clears) the pet as a favorite.
not in Blizzard's documentation
guessed
SetFilterCheckedSets the filters in the filter menu.
not in Blizzard's documentation
guessed
SetHoveredBattlePetMarks a battle pet as hovered. · by wowlua
(battlePetGUID: string)
guessed
SetPetLoadOutInfoPlaces the specified pet into a battle pet slot.
not in Blizzard's documentation
guessed
SetPetSortParameterChanges the battle pet ordering in the pet journal.
not in Blizzard's documentation
guessed
SetPetSourceCheckedSets the pet source in the filter menu.
not in Blizzard's documentation
guessed
SetPetTypeFilterSets the pet type in the filter menu.
not in Blizzard's documentation
guessed
SetSearchFilterSets the search filter in the pet journal.
(filterText: string)
guessed
SpellTargetBattlePetCasts the pending targeted spell on a battle pet in the pet journal. · by wowlua
(battlePetGUID: string)
guessed
SummonPetByGUIDSummons (or dismisses) a pet.
not in Blizzard's documentation
guessed
SummonRandomPetSummons a random battle pet companion.
not in Blizzard's documentation
guessed

"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.

Events

eventpayloadfired by the emulator
BATTLEPET_FORCE_NAME_DECLENSIONname: string, battlePetGUID: stringnot implemented
COMPANION_LEARNEDno payloadnot implemented
COMPANION_UNLEARNEDno payloadnot implemented
COMPANION_UPDATEcompanionType: string?not implemented
NEW_PET_ADDEDbattlePetGUID: stringnot implemented
PET_JOURNAL_AUTO_SLOTTED_PETslotIndex: number, battlePetGUID: stringnot implemented
PET_JOURNAL_CAGE_FAILEDno payloadnot implemented
PET_JOURNAL_LIST_UPDATEno payloadimplemented
PET_JOURNAL_NEW_BATTLE_SLOTno payloadnot implemented
PET_JOURNAL_PETS_HEALEDno payloadnot implemented
PET_JOURNAL_PET_DELETEDbattlePetGUID: stringnot implemented
PET_JOURNAL_PET_RESTOREDbattlePetGUID: stringnot implemented
PET_JOURNAL_PET_REVOKEDbattlePetGUID: stringnot implemented
PET_JOURNAL_TRAP_LEVEL_SETtrapLevel: numberimplemented
UPDATE_SUMMONPETS_ACTIONno payloadimplemented

An event the emulator doesn't fire on its own can still be fired from a test: mock.fireEvent("BATTLEPET_FORCE_NAME_DECLENSION").

Structures

  • PetAbilityLevelInfo · abilityID, level
  • PetJournalPetInfo · speciesID, customName?, petLevel?, xp?, maxXP?, displayID?, isFavorite?, icon, petType, creatureID, name?, sourceText, description, isWild?, canBattle, tradable, unique, obtainable, canAttachToDecor, creatureModelScale?

sources

Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (PetJournalInfo system, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.