Hi all
I am trying to print the links for pets and mounts that I have not yet collected by clicking on them in the Collections journal.
I can add
"onclick" functions on the scroll buttons that prints the details of the selected pet yet if it is not collected I cannot seem to get the link.
There are API calls that are meant to return the current pet GUID however on uncollected pets they return nil.
Here is the chunk;
Lua Code:
local petIndex = 0
while true do
petIndex = petIndex + 1
local buttonName = "PetJournalListScrollFrameButton" .. petIndex
local button = _G[buttonName]
if not button then break end
button:HookScript("OnClick",
function(self)
print("*****************************************************")
print("*****************************************************")
print("PetButton\nindex =", self.index, "\nspeciesID =", self.speciesID, "\npetID =", self.petID, "\n**********************")
local petID, speciesID, owned, customName, level, favorite, isRevoked, speciesName, icon, petType, companionID, tooltip, description, isWild, canBattle, isTradeable, isUnique, obtainable = C_PetJournal.GetPetInfoByIndex(self.index)
print("GetPetInfoByIndex\npetID -", petID, "\nspeciesID -", speciesID, "\nspeciesName -",speciesName, "\ncompanionID -",companionID, "\ntooltip -",tooltip, "\ndescription -",description, "\n **********************")
local speciesName, speciesIcon, petType, companionID, tooltipSource, tooltipDescription, isWild, canBattle, isTradeable, isUnique, obtainable, creatureDisplayID = C_PetJournal.GetPetInfoBySpeciesID(self.speciesID)
print("C_PetJournal.GetPetInfoBySpeciesID\nspeciesName -", speciesName, "\npetType -", petType, "\ncompanionID -",companionID, "\ntooltipSource -",tooltipSource, "\ntooltipDescription -",tooltipDescription, "\ndescription -",description, "\ncreatureDisplayID", creatureDisplayID, "\n **********************")
local speciesId, petGUID = C_PetJournal.FindPetIDByName(speciesName)
print("C_PetJournal.FindPetIDByName\nspeciesId -", speciesId, "\npetGUID -", petGUID)
print("*****************************************************")
print("*****************************************************")
end)
end
And these are the results;
I have not been able to get the links no matter what I have tried.
Is there another way to get mount and pet links, or is this totally hidden from us by Blizz?