3pT2BS: Allow casting Battle Shout in combat, and add back automatic switching back to normal gear immediately after casting Battle Shout, as this works properly with battle-shouting in combat.

This commit is contained in:
Casper V. Kristensen 2020-10-19 16:12:22 +02:00
parent f22939b979
commit 6d5cd315fa
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -32,7 +32,7 @@ end
local button = CreateFrame("Button", "3pT2BS", UIParent, "SecureActionButtonTemplate") local button = CreateFrame("Button", "3pT2BS", UIParent, "SecureActionButtonTemplate")
button:SetAttribute("type", "macro") button:SetAttribute("type", "macro")
button:SetAttribute("macrotext", wrathOff) button:SetAttribute("macrotext", actions.takeWrathOff)
button:SetScript("PreClick", function (self, button, down) button:SetScript("PreClick", function (self, button, down)
if InCombatLockdown() then if InCombatLockdown() then
return return
@ -49,7 +49,7 @@ button:SetScript("PreClick", function (self, button, down)
if not has3pT2() then if not has3pT2() then
return self:SetAttribute("macrotext", actions.putWrathOn) return self:SetAttribute("macrotext", actions.putWrathOn)
end end
return self:SetAttribute("macrotext", actions.castBattleShout) return self:SetAttribute("macrotext", actions.castBattleShout .. actions.takeWrathOff)
end) end)
@ -88,7 +88,6 @@ function events:ADDON_LOADED()
}, },
["castBattleShout"] = { ["castBattleShout"] = {
"/cancelaura Bloodrage", "/cancelaura Bloodrage",
"/stopmacro [combat]",
"/cast Battle Shout", "/cast Battle Shout",
}, },
["takeWrathOff"] = { ["takeWrathOff"] = {