Quantcast
Get Spell Link in Classic - WoWInterface
Thread Tools Display Modes
11-28-21, 09:51 PM   #1
Walkerbo
A Flamescale Wyrmkin
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 146
Get Spell Link in Classic

Hi all

I am adapting one of my current addons to Classic.

I have a button that I can drop an item or spell onto.

If the object is an item I just do a simple print.

If the object is a spell I get the spellID and then I get the spellLink and then do a print.

Here is my chunk;
Lua Code:
  1. if CursorHasItem() then
  2.     print("Has Item")
  3. elseif CursorHasSpell() then
  4.     print("Has Spell")
  5.     cursorType, _, _, spellID = GetCursorInfo()
  6.     spellLink = GetSpellLink(spellID)
  7.     print("SpellID:", spellID, " - SpellLink:", spellLink)
  8. else
  9.     print("???")
  10. end

When I drop class spells and racial spell onto my button I get the following output.



In retail, I get the correct spellLink print, yet in Classic I only get the spellName.

How do I get the spellLink in Classic?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz

Last edited by Walkerbo : 11-28-21 at 09:58 PM.
  Reply With Quote
11-29-21, 05:48 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,057
I don't know about TBCC, but Classic Era doesn't support spell links.
__________________
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
11-29-21, 06:04 AM   #3
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 587
GetSpellLink wasn't added until 2.4.0. It should be available in BCC but it's not in Classic.
  Reply With Quote
11-30-21, 09:12 PM   #4
Walkerbo
A Flamescale Wyrmkin
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 146
Hi Kanegasi and SDPhantom

Thanks for letting me know, I will just to save the spell name instead.

Not a real issue, though it would be nice to have.

Cheers
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
12-06-21, 08:51 PM   #5
fullmoon_sulfuras
A Deviate Faerie Dragon
Join Date: Dec 2019
Posts: 15
I have the exact same problem. Is there an alternative way to get the spell link in Classic?

Thanks!
  Reply With Quote
12-13-21, 05:09 PM   #6
Walkerbo
A Flamescale Wyrmkin
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 146
Hi fullmoon_sulfuras

So far I have not found a way to get the spell link; I have to save the spells by their spell name only.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Get Spell Link in Classic

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