View Single Post
05-22-16, 10:01 AM   #63
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Originally Posted by Simca View Post
there are two main APIs - C_TradeSkillUI.GetAllRecipeIDs() and C_TradeSkillUI.GetFilteredRecipeIDs() (spelling?). The former ignores filters/searching while the latter respects them.
The mount journal works this way too but from the other direction. In WoD the indexes were always available. Now there's C_MountJournal.GetMountIDs() and C_MountJournal.GetDisplayedMountInfo() and the WoD index functions were removed.

I'd kill for an equivalent for the pet journal. No new indexing would be needed, just fill the table with petIDs for pets the player owns and speciesIDs otherwise. An addon can work it out from there much easier than:

- hook C_PetJournal.SetSearchFilter and C_PetJournal.ClearSearchFilter to watch the search being changed (because there's no C_PetJournal.GetSearchFilter)
- watch for number of owned pets changing in PET_JOURNAL_LIST_UPDATE
- when that happens:
- backup the collected/uncollected, types, sources filters
- turn on all those filters and clear search
- gather pets into a table
- restore to backup and restore search