File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -990,6 +990,22 @@ function Addon.BindingConfig.Window:CreateTreeFrame()
990990 for _ , binding in ipairs (objects ) do
991991 if binding .actionType ~= type then
992992 first = first or binding
993+
994+ -- When converting spell to macro, try pre-define name, icon and a "/cast" in macro.
995+ if binding .actionType == Clicked .ActionType .SPELL and type == Clicked .ActionType .MACRO then
996+ if binding .action .spellValue then
997+ local spellName = C_Spell .GetSpellName (binding .action .spellValue )
998+ local iconId , _ = C_Spell .GetSpellTexture (binding .action .spellValue )
999+ if spellName then
1000+ binding .action .macroName = " Cast " .. spellName .. " (Macro)"
1001+ binding .action .macroValue = " /cast " .. spellName
1002+ end
1003+ if iconId then
1004+ binding .action .macroIcon = iconId
1005+ end
1006+ end
1007+ end
1008+
9931009 binding .actionType = type
9941010
9951011 Addon :ReloadBinding (binding , true )
You can’t perform that action at this time.
0 commit comments