Quantcast WoWInterface - View Single Post - C_PetJournal changes
View Single Post
05-13-16, 07:25 AM   #1
A Firelord
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 488
C_PetJournal changes

Some C_PetJournal functions were renamed:

IsFlagFiltered -> IsFilterChecked
IsPetSourceFiltered -> IsPetSourceChecked
IsPetTypeFiltered -> IsPetTypeChecked
SetFlagFilter -> SetFilterChecked
SetPetSourceFilter -> SetPetSourceChecked
(SetPetTypeFilter was not renamed which I believe is an oversight)

The filter flags were renamed too:


The functions to clear and add all filters were combined into a single function that takes true/false to set/clear all filters:

ClearAllPetSourcesFilter - Removed
AddAllPetSourcesFilter - Removed
SetAllPetSourcesChecked - New

ClearAllPetTypesFilter - Removed
AddAllPetTypesFilter - Removed
SetAllPetTypesChecked - New

A few new functions:

PetNeedsFanfare - New
GetNumPetsNeedingFanfare - New
ClearFanfare - New
GetNumMaxPets - New (Returns 1000; likely 1500 after player has used a Pocket Pet Portal)

Pets can be wrapped in the journal much like items can be wrapped in container slots. This is referred to as "Fanfare" in the default code. A player can unwrap a pet with "Unwrap" in the pet's right-click menu, by attempting to summon the pet, or by clicking its model. Some context for its functions:

-- This is only used in MainMenuBarMicroButtons.lua to alert when a pet needs unwrapped
numPetsNeedingFanfare = C_PetJournal.GetNumPetsNeedingFanfare()

-- This is used throughout Blizzard_PetCollection.lua to show the wrapped icon instead of the pet icon
needsFanfare = C_PetJournal.PetNeedsFanfare(petID)

-- This is called during PetJournal_UnwrapPet in Blizzard_PetCollection.lua after a delay when unwrapping a pet:

As yet I'm not sure what causes them to be wrapped. The ones we ordinarily get in the mail when we create a character were wrapped and already in the journal when creating a beta template character.

Some other observations:
  • There appear to be no changes to C_PetBattles.
  • No new returns for GetPetInfoByIndex/PetID/SpeciesID. Pet BreedIDs are still not exposed.
  • The GUID of petIDs remains unchanged from WoD: BattlePet-0-000000000000.
  • There still appears to be no way to empty a battle pet slot like we could in MoP.