View Single Post
05-14-16, 01:48 PM   #44
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Spell Links have an extra parameter glyphId.
It's required to include it when used in chat channels, otherwise the link won't show up.
Code:
/run SendChatMessage("\124cff71d5ff\124Hspell:133:0\124h[Fireball]\124h\124r")
Code:
TEXT_MODE_A_STRING_SPELL = "|Hspell:%s:%s:%s|h%s|h"
Code:
local _, spellId, glyphId, event = strsplit(":", link);
https://github.com/Gethe/wow-ui-sour...tLog.lua#L3178
https://github.com/Gethe/wow-ui-sour...tLog.lua#L3533

Only the number 0 seems to work for normal spell links. Haven't checked it with any glyphs on yet.
Ofcourse we can still just use GetSpellLink() if the glyphId is not important.

Not sure if this was already documented by someone else.

Last edited by Ketho : 05-14-16 at 03:17 PM.