wow-addons/z-ByeByeBuffs/ByeByeBuffs.lua

66 lines
1.8 KiB
Lua
Raw Normal View History

2020-10-19 16:18:49 +02:00
ByeByeBuffs = {}
ByeByeBuffs.title = GetAddOnMetadata("ByeByeBuffs", "Title")
ByeByeBuffs.version = GetAddOnMetadata("ByeByeBuffs", "Version")
ByeByeBuffs.author = GetAddOnMetadata("ByeByeBuffs", "Author")
print(("Loaded %s v%s by %s."):format(ByeByeBuffs.title, ByeByeBuffs.version, ByeByeBuffs.author))
local blacklistedAuras = {
"Honorless Target",
"Cozy Fire",
"Find Minerals",
"Find Herbs",
"Slip'kik's Savvy",
"Unending Breath",
"Water Breathing",
"Water Walking",
"Detect Lesser Invisibility",
"Detect Invisibility",
"Detect Greater Invisibility",
"Arcane Intellect",
"Arcane Brilliance",
"Blessing of Wisdom",
"Blessing of Sanctuary",
"Greater Blessing of Wisdom",
"Greater Blessing of Sanctuary",
"Divine Spirit",
"Prayer of Spirit",
--"Renew",
"Regrowth",
--"Rejuvenation",
2021-03-23 15:15:59 +01:00
--"Greater Heal",
"Inspiration",
"Holy Power",
"Innervate",
"Lightwell Renew",
"Thorns",
"Bloodthirst",
"Armor of Faith",
"Power Infusion",
"Healing Way",
"Ancestral Fortitude",
"Headmaster's Charge",
"Agility",
"Intellect",
"Armor",
"Spirit",
"Stamina",
"Strength",
"Lightning Shield",
"Argent Dawn Commission",
2020-10-19 16:18:49 +02:00
}
local cancelBlacklistedAurasMacro = "/cancelaura " .. table.concat(blacklistedAuras, "\n/cancelaura ")
local button = CreateFrame("Button", "BBB", UIParent, "SecureActionButtonTemplate")
button:SetAttribute("type", "macro")
button:SetAttribute("macrotext", "/stopmacro")
local frame = CreateFrame("FRAME")
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", function(self, event, ...)
if IsInInstance() then
2020-10-19 16:18:49 +02:00
return button:SetAttribute("macrotext", cancelBlacklistedAurasMacro)
end
return button:SetAttribute("macrotext", "/stopmacro")
end)