WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   WoW Classic: GetSpellLink broken? (https://www.wowinterface.com/forums/showthread.php?t=57731)

MuffinManKen 12-13-19 07:14 AM

WoW Classic: GetSpellLink broken?
 
I've done a bunch of testing and GetSpellLink seems to always just return the name of the spell, not a link at all.

Am I doing something wrong? Is this a known/acknowledged issue?

Ketho 12-13-19 08:17 AM

It's intentional, iirc vanilla did not have spell links

MuffinManKen 12-13-19 08:23 AM

Then why even include the function? Interestingly, Blizzard addons use GetSpellLink. So just a lazy conversion from Retail?

GameTooltip:SetHyperLink(spell_link) *does* work, you just need to format the spell link yourself.

Ketho 12-13-19 08:36 AM

Hey that could be a fun idea with chat addons to parse messages for any plain text spell links, to still make it show as a link and show to tooltip

SDPhantom 12-13-19 03:23 PM

Quote:

Originally Posted by MuffinManKen (Post 334769)
Then why even include the function? Interestingly, Blizzard addons use GetSpellLink. So just a lazy conversion from Retail?

Short answer, yes. There are many features they stripped out just by altering the returns of the API functions.



Quote:

Originally Posted by Ketho (Post 334770)
Hey that could be a fun idea with chat addons to parse messages for any plain text spell links, to still make it show as a link and show to tooltip

If only. There's no reliable way to obtain a SpellID, which is necessary to reconstruct a link. There are many name collisions and you can't query the API for a spell you don't know by name.

LBXZero 12-17-19 03:49 AM

May I ask, what are you intending to do with GetSpellLink and SpellID?

MuffinManKen 12-19-19 12:12 AM

Quote:

Originally Posted by LBXZero (Post 334793)
May I ask, what are you intending to do with GetSpellLink and SpellID?

Me? I use it to show tooltips: GameTooltip:SetHyperLink(spell_link)

LBXZero 12-19-19 10:37 PM

I could take a look at it for my addon. In my testing, the chat link from a spell in the spellbook in Classic only puts the name, no tooltip link.

MuffinManKen 12-21-19 06:53 PM

Quote:

Originally Posted by LBXZero (Post 334815)
I could take a look at it for my addon. In my testing, the chat link from a spell in the spellbook in Classic only puts the name, no tooltip link.

Yes, GetSpellLink only returns the spell name in Classic.

LBXZero 12-22-19 09:16 AM

Quote:

Originally Posted by MuffinManKen (Post 334823)
Yes, GetSpellLink only returns the spell name in Classic.

I am guessing that you want a chat link like items where you can view a tolltip when clicking on the link in the chat window.

Edit:
A small look at what it could take to add a spell chatlink like the items, and it looks like a nightmare adding stuff back into the chat box.


All times are GMT -6. The time now is 10:31 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI