Getting links for uncollected pets and mounts
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:
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? |
Quote:
The API not returning the GUID makes sense because it refers to a unique pet you own Pet links include that GUID so you can't normally link pets you don't have collected yourself You can still make a link yourself, it requires at least: https://wowpedia.fandom.com/wiki/UI_...nces#battlepet
For example I don't own Crawbat Code:
/run print("\124cff1eff00\124Hbattlepet:3083:1:2::::BattlePet--:\124h[Crawbat]\124h\124r") |
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:
So I still believe the following should work; Lua Code:
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. |
Quote:
I don't think you understand the concept of a GUID. A specific battlepet you own has a globally unique ID, just like a unitGUID and not to be confused with a speciesID :rolleyes: https://en.wikipedia.org/wiki/Univer...que_identifier Mounts use the spell ID when linked and are obviously different than battlepets where players can collect multiples of the same pet with variable levels and stats |
Hi Ketho
Thanks for your post, you make some very good points. I can see why pets have more unique GUID's to cover the fact that you can have multiples with different stats. Also, the fact that some players have renamed their pets and the same pet can be captured in different rarities drives that point home. It still irks me though as the uncollected pets are all baseline, yet the same problem would be the stats and rarities are not all baseline. Oh well, you did make me think harder about the reasons and I can see that you are right. Also, you did show me how I can create my own special links and this in itself is a great outcome. Thanks for your help with this. :) |
All times are GMT -6. The time now is 07:00 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI