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

@ -5,40 +5,48 @@ ByeByeBuffs.author = GetAddOnMetadata("ByeByeBuffs", "Author")
print(("Loaded %s v%s by %s."):format(ByeByeBuffs.title, ByeByeBuffs.version, ByeByeBuffs.author)) print(("Loaded %s v%s by %s."):format(ByeByeBuffs.title, ByeByeBuffs.version, ByeByeBuffs.author))
local blacklistedAuras = { local blacklistedAuras = {
"Honorless Target", "Honorless Target",
"Cozy Fire", "Cozy Fire",
"Find Minerals", "Find Minerals",
"Find Herbs", "Find Herbs",
"Unending Breath", "Slip'kik's Savvy",
"Water Breathing", "Unending Breath",
"Water Walking", "Water Breathing",
"Detect Lesser Invisibility", "Water Walking",
"Detect Invisibility", "Detect Lesser Invisibility",
"Detect Greater Invisibility", "Detect Invisibility",
"Arcane Intellect", "Detect Greater Invisibility",
"Arcane Brilliance", "Arcane Intellect",
"Blessing of Wisdom", "Arcane Brilliance",
"Blessing of Sanctuary", "Blessing of Wisdom",
"Greater Blessing of Wisdom", "Blessing of Sanctuary",
"Greater Blessing of Sanctuary", "Greater Blessing of Wisdom",
"Divine Spirit", "Greater Blessing of Sanctuary",
"Prayer of Spirit", "Divine Spirit",
"Renew", "Prayer of Spirit",
"Regrowth", --"Renew",
"Rejuvenation", "Regrowth",
"Greater Heal", --"Rejuvenation",
"Inspiration", "Greater Heal",
"Innervate", "Inspiration",
"Lightwell Renew", "Holy Power",
"Thorns", "Innervate",
"Bloodthirst", "Lightwell Renew",
"Armor of Faith", "Thorns",
"Power Infusion", "Bloodthirst",
"Healing Way", "Armor of Faith",
"Ancestral Fortitude", "Power Infusion",
"Headmaster's Charge", "Healing Way",
"Seal of the Dawn", "Ancestral Fortitude",
"Champion of the Dawn", "Headmaster's Charge",
"Agility",
"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)