WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Get Spell Link in Classic (https://www.wowinterface.com/forums/showthread.php?t=58991)

Walkerbo 11-28-21 09:51 PM

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?

SDPhantom 11-29-21 05:48 AM

I don't know about TBCC, but Classic Era doesn't support spell links.

Kanegasi 11-29-21 06:04 AM

GetSpellLink wasn't added until 2.4.0. It should be available in BCC but it's not in Classic.

Walkerbo 11-30-21 09:12 PM

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

fullmoon_sulfuras 12-06-21 08:51 PM

I have the exact same problem. Is there an alternative way to get the spell link in Classic?

Thanks!

Walkerbo 12-13-21 05:09 PM

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.


All times are GMT -6. The time now is 06:20 AM.

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