Skip to content

Commit

Permalink
Fix the macro button
Browse files Browse the repository at this point in the history
There's a lot more global macros now, so we weren't finding a
previously-created macro. Also, most of the spells we used no longer
exist, so get rid of all of the dead spells. I don't have any spells to
replace them with at the moment.

Because most of the spells are dead, also define macro rules for cases
where we only have an in-combat spell and not an out-of-combat one.
  • Loading branch information
lilyball committed Aug 14, 2016
1 parent a0cc0cf commit 26f113a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions MacroGenerator.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

local myname, Cork = ...
local MAX_ACCOUNT_MACROS, MAX_CHARACTER_MACROS = 36, 18

local function GetMacroID()
for i=(MAX_ACCOUNT_MACROS+1),(MAX_ACCOUNT_MACROS+MAX_CHARACTER_MACROS) do if GetMacroInfo(i) == "Cork" then return i end end
Expand All @@ -16,16 +15,16 @@ function Cork.GenerateMacro()
local icon = "INV_MISC_QUESTIONMARK"
local c = Cork.MYCLASS
if c == "DEATHKNIGHT" then ooc = 3714
elseif c == "HUNTER" then ooc = 13165
elseif c == "SHAMAN" then ooc = 324
elseif c == "WARLOCK" then ooc = 6201
elseif c == "WARRIOR" then ooc = 6673
elseif c == "MONK" then ooc = 115921
elseif c == "HUNTER" then -- ooc = 13165 -- dead spell
elseif c == "SHAMAN" then -- ooc = 324 -- dead spell
elseif c == "WARLOCK" then -- ooc = 6201
elseif c == "WARRIOR" then -- ooc = 6673 -- dead spell
elseif c == "MONK" then -- ooc = 115921 -- dead spell
elseif c == "ROGUE" then ooc = 2823
elseif c == "DRUID" then ic, ooc = 22812, 1126
elseif c == "MAGE" then ic, ooc = 30482, 1459
elseif c == "PALADIN" then ic, ooc = 20165, 19740
elseif c == "PRIEST" then ic, ooc = 588, 21562
elseif c == "DRUID" then ic, ooc = 22812, nil -- 1126 -- dead spell
elseif c == "MAGE" then ic, ooc = 30482, nil -- 1459 -- dead spell
elseif c == "PALADIN" then -- ic, ooc = 20165, 19740 -- dead spells
elseif c == "PRIEST" then -- ic, ooc = 588, 21562 -- dead spells
end
if ic and ooc then
ic, ooc = GetSpellInfo(ic), GetSpellInfo(ooc)
Expand All @@ -39,6 +38,9 @@ function Cork.GenerateMacro()
else
body = "#showtooltip "..ooc.."\n/click CorkFrame"
end
elseif ic then
ic = GetSpellInfo(ic)
body = "#showtooltip [combat] "..ic.."\n/cast [combat] "..ic.."\n/stopmacro [combat]\n/click CorkFrame"
else
body = "/click CorkFrame"
end
Expand Down

0 comments on commit 26f113a

Please sign in to comment.