• Dear Guest,

    You're browsing our forum as a Guest meaning you can only see a portion of the forum in read-only mode.
    To view all forum nodes and be able to create threads/posts please register or log-in with your existing account.

    TwinStar team

An addon for posting the names of the spells in chat?

Blaze

Authorized
Joined
Apr 20, 2015
Likes
3
#1
Hello again,

I would like to post names of spells in chat with a single click (or with shift + click), is there any addon capable to do that?

Is there any addon capable to do that?
 

Garkin

New Member
Joined
Nov 27, 2018
Likes
0
#2
I believe that there is no way to get spell link in vanilla wow. Function GetSpellLink was added in TBC expansion. However yes, it is possible to send plain text name of the spell to the chat when you click on spellbook button. I don't know any addon which has this function, but it can be achieved in few lines of code. Something like (untested):

code_language.lua:
local original_SpellButton_OnClick = SpellButton_OnClick

function SpellButton_OnClick(drag)
	local id = SpellBook_GetSpellID(this:GetID())
	if (id > MAX_SPELLS) then
		return
	end

	if (IsShiftKeyDown() and ChatFrameEditBox:IsVisible() and not (MacroFrame and MacroFrame:IsVisible())) then
		local spellName, subSpellName = GetSpellName(id, SpellBookFrame.bookType)
		if(spellName) then
			if (subSpellName and (strlen(subSpellName) > 0)) then
				spellName = spellName.."("..subSpellName..")"
			end
			ChatFrameEditBox:Insert(" "..spellName)
		end
		return
	else
		original_SpellButton_OnClick(drag)
	end
end
 
Last edited:
Top Bottom