Hi was looking for some help to get Aurawatch to change filters based on class current spec.
My Current scripts are
Lua Code:
lib.CreateAuraWatch = function(self, unit, icon)
local auras = CreateFrame("Frame", nil, self)
auras:SetPoint("TOPLEFT", self.Health, -1, 1)
auras:SetPoint("BOTTOMRIGHT", self.Power, 1, -1)
auras.presentAlpha = 1
auras.missingAlpha = 0
auras.hideCooldown = cfg.hidecooldown
auras.icons = {}
auras.PostCreateIcon = CreateAuraWatchIcon
local buffs = {}
-- Non Class Specific Buffs --
if (filters.buffids["ALL"]) then
for key, value in pairs(filters.buffids["ALL"]) do
tinsert(buffs, value)
end
end
-- Toggle Roles --
if (filters.healbuffids[lib.playerClass]) then
for key, value in pairs(filters.healbuffids[lib.playerClass]) do
tinsert(buffs, value)
end
end
-- "Cornerbuffs"
if (buffs) then
for key, spell in pairs(buffs) do
local icon = CreateFrame("Frame", nil, auras)
icon.spellID = spell[1]
icon.anyUnit = spell[4]
icon:SetWidth(cfg.raidiconsize)
icon:SetHeight(cfg.raidiconsize)
icon:SetPoint(spell[2], spell[3], 0)
icon:SetFrameLevel(50)
-- Overlay for Count Text --
local iconoverlayFrame = CreateFrame("Frame", nil, icon, nil)
iconoverlayFrame:SetFrameStrata("HIGH")
iconoverlayFrame:SetFrameLevel(95)
-- Count text --
local count = iconoverlayFrame:CreateFontString(nil, "OVERLAY")
count:SetFont(cfg.Font, 11, cfg.FontF)
count:SetPoint('TOPRIGHT', icon, 2, 1)
count:SetParent(iconoverlayFrame)
icon.count = count
auras.icons[spell[1]] = icon
end
end
self.AuraWatch = auras
end
I want to be able to have the filters change based on what my current spec is for the class
For Healing
Lua Code:
-- Toggle Roles --
if (filters.healbuffids[lib.playerClass]) then
for key, value in pairs(filters.healbuffids[lib.playerClass]) do
tinsert(buffs, value)
end
end
For Tanking it would change to
Lua Code:
-- Toggle Roles --
if (filters.tankbuffids[lib.playerClass]) then
for key, value in pairs(filters.tankbuffids[lib.playerClass]) do
tinsert(buffs, value)
end
end
Any help would be appreciated
Thanks in Advance