Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-28-21, 09:51 PM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
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
 

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


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