Quantcast WoW Classic: GetSpellLink broken? - WoWInterface
Thread Tools Display Modes
12-13-19, 07:14 AM   #1
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 101
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?
  Reply With Quote
12-13-19, 08:17 AM   #2
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 911
It's intentional, iirc vanilla did not have spell links
  Reply With Quote
12-13-19, 08:23 AM   #3
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 101
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.

Last edited by MuffinManKen : 12-13-19 at 08:29 AM.
  Reply With Quote
12-13-19, 08:36 AM   #4
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 911
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
  Reply With Quote
12-13-19, 03:23 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,905
Originally Posted by MuffinManKen View Post
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.



Originally Posted by Ketho View Post
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.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-17-19, 03:49 AM   #6
LBXZero
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
May I ask, what are you intending to do with GetSpellLink and SpellID?
  Reply With Quote
12-19-19, 12:12 AM   #7
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 101
Originally Posted by LBXZero View Post
May I ask, what are you intending to do with GetSpellLink and SpellID?
Me? I use it to show tooltips: GameTooltip:SetHyperLink(spell_link)
  Reply With Quote
12-19-19, 10:37 PM   #8
LBXZero
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
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.
  Reply With Quote
12-21-19, 06:53 PM   #9
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 101
Originally Posted by LBXZero View Post
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.
  Reply With Quote
12-22-19, 09:16 AM   #10
LBXZero
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
Originally Posted by MuffinManKen View Post
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.

Last edited by LBXZero : 12-27-19 at 08:04 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » WoW Classic: GetSpellLink broken?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off