Thread Tools Display Modes
08-15-09, 05:35 PM   #1
Belelros
A Defias Bandit
Join Date: Jan 2009
Posts: 3
Linking spells in an addon

Does anyone knows how can I link a spell in an addon?

I thought about making class guides for our guildies in an addon and it would be great if I can link those spells.

Thanks in advance.
  Reply With Quote
08-16-09, 12:35 AM   #2
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
Belelros, the function you want is GetSpellLink, which will return a spell link string from its spell ID number, which you can then set in a text string, or send to someone in a chat message. For example, the following function will output the spell link to your default chat frame for a given spell ID:

Code:
function ShowSpellLink(spellID)
    local spellLink = GetSpellLink(spellID or 0) or "<no spellLink found>";
    DEFAULT_CHAT_FRAME:AddMessage(spellLink);
end
__________________
Cirk's Addons
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Linking spells in an addon


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