So finally making aura for my group frames after I found what seemed like a great example but I'm a bit stuck. The example I found uses (select(4,UnitBuff("player","AURANAME))) So I think I can use "group" but obviously it doesn't work. Do I have to repeat the event checkfor party and raid? I'm using ouf for the raid frames
Indicater script
Lua Code:
if cfg.indicators.enable then
indicatorframe = CreateFrame("Frame","IndicatorFrame",self)
indicatorframe:SetPoint('TOPLEFT')
indicatorframe:SetPoint('BOTTOMRIGHT')
indicatorframe:EnableMouse(0)--disable mouse
--Build the indicator
indicator1 = CreateFrame(nil, 'OVERLAY')
indicator1:SetPoint("TOPLEFT",indicatorframe,0,0)
indicator1:SetWidth(5)
indicator1:SetHeight(5)
indicator1:SetBackdrop({bgFile="Interface\\Buttons\\WHITE8x8"})
indicator2 = CreateFrame(nil, 'OVERLAY')
indicator2:SetPoint("TOPRIGHT",indicatorframe,0,0)
indicator2:SetWidth(5)
indicator2:SetHeight(5)
indicator2:SetBackdrop({bgFile="Interface\\Buttons\\WHITE8x8"})
indicator3 = CreateFrame(nil, 'OVERLAY')
indicator3:SetPoint("BOTTOMLEFT",indicatorframe,0,0)
indicator3:SetWidth(5)
indicator3:SetHeight(5)
indicator3:SetBackdrop({bgFile="Interface\\Buttons\\WHITE8x8"})
indicator4 = CreateFrame(nil, 'OVERLAY')
indicator4:SetPoint("BOTTOMRIGHT",indicatorframe,0,0)
indicator4:SetWidth(5)
indicator4:SetHeight(5)
indicator4:SetBackdrop({bgFile="Interface\\Buttons\\WHITE8x8"})
--Show Hide
indicatorframe:SetScript("OnEvent", function(self, OnEvent)
if event == "UNIT_AURA" then
indicator1 = (select(4,UnitBuff("party",cfg.indicators.aura1)))
elseif event == "UNIT_AURA" then
indicator2 = (select(4,UnitBuff("party",cfg.indicators.aura2)))
elseif event == "UNIT_AURA" then
indicator3 = (select(4,UnitBuff("party",cfg.indicators.aura3)))
elseif event == "UNIT_AURA" then
indicator4 = (select(4,UnitBuff("party",cfg.indicators.aura4)))
elseif indicator1 == nil then
indicator1:Hide()
elseif indicator2 == nil then
indicator2:Hide()
elseif indicator3 == nil then
indicator3:Hide()
elseif indicator4 == nil then
indicator4:Hide()
end
end)
indicator1:RegisterEvent("UNIT_AURA")
indicator2:RegisterEvent("UNIT_AURA")
indicator3:RegisterEvent("UNIT_AURA")
indicator4:RegisterEvent("UNIT_AURA")
end
SVN is currently down for some reason can't post to it, so here's pastebin
config
http://pastebin.com/d32JQuK8
group frame code
http://pastebin.com/SJEzm9xn