From 054d03039f00028d6f290a46a7e784510ed4bcf4 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Sun, 18 Oct 2020 04:17:49 +0200 Subject: [PATCH] 3pT2BS: Fix action composition. --- 3pT2BS/3pT2BS.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/3pT2BS/3pT2BS.lua b/3pT2BS/3pT2BS.lua index e51b8ef..19074f5 100644 --- a/3pT2BS/3pT2BS.lua +++ b/3pT2BS/3pT2BS.lua @@ -5,7 +5,7 @@ ThreepT2BS.author = GetAddOnMetadata("3pT2BS", "Author") print(("Loaded %s v%s by %s."):format(ThreepT2BS.title, ThreepT2BS.version, ThreepT2BS.author)) local lastT2BattleShout = 0 -local actionMacros = {} +local actions = {} local function hasRecentlyBattleShouted() @@ -38,18 +38,18 @@ button:SetScript("PreClick", function (self, button, down) return end if hasRecentlyBattleShouted() then - return self:SetAttribute("macrotext", actionMacros.takeWrathOff) + return self:SetAttribute("macrotext", actions.takeWrathOff) end if not hasEnoughRageForBattleShout() then if isBloodRageReady() then - return self:SetAttribute("macrotext", actionMacros.putWrathOn .. actionMacros.castBloodRage) + return self:SetAttribute("macrotext", actions.putWrathOn .. actions.castBloodRage) end - return self:SetAttribute("macrotext", actionMacros.takeWrathOff) + return self:SetAttribute("macrotext", actions.takeWrathOff) end if not has3pT2() then - return self:SetAttribute("macrotext", actionMacros.putWrathOn) + return self:SetAttribute("macrotext", actions.putWrathOn) end - return self:SetAttribute("macrotext", actionMacros.castBattleShout) + return self:SetAttribute("macrotext", actions.castBattleShout .. actions.takeWrathOff) end) @@ -101,7 +101,7 @@ function events:ADDON_LOADED() }, } for action, lines in pairs(ThreepT2BSDB.actions) do - actionMacros[action] = table.concat(lines, "\n") + actions[action] = table.concat(lines, "\n") .. "\n" -- extra newline allows for action composition end end