Skip to content

Instantly share code, notes, and snippets.

Created November 30, 2014 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/dda27accffef2b17ce43 to your computer and use it in GitHub Desktop.
Save anonymous/dda27accffef2b17ce43 to your computer and use it in GitHub Desktop.
local UnitEventHandlers = {}
cfg.raidAuras = {
[GetSpellInfo(2584)] = true, -- waiting to ressurect
[GetSpellInfo(159916)] = true, -- amplify magic
[GetSpellInfo(33076)] = true, -- prayer of mending
}
-- dispel table
local dispel_list = {
DRUID = {Curse = true, Poison = true},
MAGE = {Curse = true},
PALADIN = {Disease = true, Magic = true, Poison = true},
PRIEST = {Disease = true, Magic = true},
SHAMAN = {Curse = true, Disease = true, Poison = true},
}
local dispel = dispel_list[select(2, UnitClass('player'))]
local function raid_Auras(self, unit)
for i = 1, 40 do
local name, _, icon, _, dtype, duration, _, _, _, _, id, _, isBossDebuff = UnitAura(unit, i)
if (dispel and dispel[dtype]) or (cfg.raidAuras and cfg.raidAuras[name]) then
if duration > 0 then
frame:Show()
texture:SetTexture(icon)
if beauty and self.Graphics.Auras:IsShown() then
local colour = DebuffTypeColor[dtype] or DebuffTypeColor.none
frame:SetBackdropColor(colour.r, colour.g, colour.b)
end
else
print'successfully hidden!'
frame:Hide()
texture:SetTexture''
end
end
end
end
function UnitEventHandlers.UNIT_AURA(self, unit)
local unitid = self.UnitID
if not unitid then return end
if unit==unitid then
raid_Auras(self, unitid)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment