Hi Ketho
I am not sure that it makes sense that the petGUID is only known for pets that are currently known as there are examples of being able to get the GUID of mounts even if they are unknown.
For example, I can get the mount link for an uncollected mount using the following chunk;
Lua Code:
local mountIndex = 0
while true do
mountIndex = mountIndex + 1
local buttonName = "MountJournalListScrollFrameButton" .. mountIndex
local button = _G[buttonName]
if not button then
break
end
button:HookScript(
"OnClick",
function(self)
print("*****************************************************") -- debug --
mountLink = GetSpellLink(self.spellID)
print(mountLink)
print("*****************************************************") -- debug --
end
)
end
So I still believe the following should work;
Lua Code:
local speciesId, petGUID = C_PetJournal.FindPetIDByName(speciesName)
but it obviously returns nil for the petGUID.
I had no idea that I could create my own link, so thank you very much for the link.
I have had fun building a few of them though having no way of getting the unknown pet rarity I have to use a fixed colour for the link.