ByeByeBuffs: Add new auras, always remove in raid instance.

This commit is contained in:
Casper V. Kristensen 2021-02-10 14:16:01 +01:00
parent d03d4772ea
commit 4cfc28b03e
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -9,6 +9,7 @@ local blacklistedAuras = {
"Cozy Fire", "Cozy Fire",
"Find Minerals", "Find Minerals",
"Find Herbs", "Find Herbs",
"Slip'kik's Savvy",
"Unending Breath", "Unending Breath",
"Water Breathing", "Water Breathing",
"Water Walking", "Water Walking",
@ -23,11 +24,12 @@ local blacklistedAuras = {
"Greater Blessing of Sanctuary", "Greater Blessing of Sanctuary",
"Divine Spirit", "Divine Spirit",
"Prayer of Spirit", "Prayer of Spirit",
"Renew", --"Renew",
"Regrowth", "Regrowth",
"Rejuvenation", --"Rejuvenation",
"Greater Heal", "Greater Heal",
"Inspiration", "Inspiration",
"Holy Power",
"Innervate", "Innervate",
"Lightwell Renew", "Lightwell Renew",
"Thorns", "Thorns",
@ -37,8 +39,14 @@ local blacklistedAuras = {
"Healing Way", "Healing Way",
"Ancestral Fortitude", "Ancestral Fortitude",
"Headmaster's Charge", "Headmaster's Charge",
"Seal of the Dawn", "Agility",
"Champion of the Dawn", "Intellect",
"Armor",
"Spirit",
"Stamina",
"Strength",
"Lightning Shield",
"Argent Dawn Commission",
} }
local cancelBlacklistedAurasMacro = "/cancelaura " .. table.concat(blacklistedAuras, "\n/cancelaura ") local cancelBlacklistedAurasMacro = "/cancelaura " .. table.concat(blacklistedAuras, "\n/cancelaura ")
@ -50,10 +58,8 @@ local frame = CreateFrame("FRAME")
frame:RegisterEvent("PLAYER_REGEN_ENABLED") frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", function(self, event, ...) frame:SetScript("OnEvent", function(self, event, ...)
local isWorldBuffed = IsInRaid() and UnitAura("player", 22, "HELPFUL") -- simply checks for more than 22 buffs if IsInInstance() then
if isWorldBuffed then
return button:SetAttribute("macrotext", cancelBlacklistedAurasMacro) return button:SetAttribute("macrotext", cancelBlacklistedAurasMacro)
end end
return button:SetAttribute("macrotext", "/stopmacro") return button:SetAttribute("macrotext", "/stopmacro")
end) end)