Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2014 20:34
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/5153d080d60659e6725f to your computer and use it in GitHub Desktop.
Save anonymous/5153d080d60659e6725f to your computer and use it in GitHub Desktop.
-- from AURAS_LIST.lua
local _, list = ...
-- auras to track
list.raidAuras = {
-- shields
[GetSpellInfo(871)] = 1, -- shield wall
[GetSpellInfo(33206)] = 1, -- pain suppression
[GetSpellInfo(48707)] = 1, -- anti-magic shell
-- heals
[GetSpellInfo(2584)] = 1, -- waiting to ressurect
[GetSpellInfo(33076)] = 3, -- prayer of mending
[GetSpellInfo(159916)] = 3, -- amplify magic
[GetSpellInfo(11426)] = 1, -- ice block
[GetSpellInfo(111264)] = 1, -- ice block
-- silence
[GetSpellInfo(15487)] = 1, -- silence
[GetSpellInfo(47476)] = 1, -- strangulate
-- stuns
[GetSpellInfo(25)] = 1, -- stun
-- cc
[GetSpellInfo(118)] = 2, -- polymorph (sheep)
[GetSpellInfo(339)] = 2, -- entangling roots
[GetSpellInfo(710)] = 2, -- banish
[GetSpellInfo(1499)] = 2, -- freezing trap 1
[GetSpellInfo(2094)] = 2, -- blind
[GetSpellInfo(3355)] = 2, -- freezing trap 2
[GetSpellInfo(5782)] = 2, -- fear
[GetSpellInfo(6358)] = 2, -- seduction
[GetSpellInfo(6770)] = 2, -- sap
[GetSpellInfo(9484)] = 2, -- shackle undead
[GetSpellInfo(10326)] = 2, -- turn evil
[GetSpellInfo(19386)] = 2, -- wyvern sting
[GetSpellInfo(20066)] = 2, -- repentance
[GetSpellInfo(28271)] = 2, -- polymorph (turtle)
[GetSpellInfo(28272)] = 2, -- polymorph (pig)
[GetSpellInfo(33786)] = 2, -- cyclone
[GetSpellInfo(51514)] = 2, -- hex
[GetSpellInfo(61305)] = 2, -- polymorph (black cat)
[GetSpellInfo(61721)] = 2, -- polymorph (rabbit)
[GetSpellInfo(61780)] = 2, -- polymorph (turkey)
[GetSpellInfo(115078)] = 2, -- paralysis
}
-- dispel types per class
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},
}
list.dispel = dispel_list[select(2, UnitClass('player'))]
-- from RAID.lua
-- EVENTS
local UnitEventHandlers = {}
-- AURAS
-- aura white-list & dispellable debuffs
local auraCache = 0
local function raid_Auras(self, unit)
for i = 1, 40 do
local name, _, icon, _, dtype, duration, _, _, _, _, id, _, isBossDebuff = UnitAura(unit, i)
if (list.dispel and list.dispel[dtype]) or (list.raidAuras and list.raidAuras[name]) then
print(name)
if list.raidAuras[name] > auraCache then
auraCache = list.raidAuras[name] -- cache aura to compare future priorities against
self.Graphics.Auras:Show()
self.Graphics.AurasTexture:SetTexture(icon)
if beauty and self.Graphics.Auras:IsShown() then
local colour = DebuffTypeColor[dtype] or DebuffTypeColor.none
self.Graphics.Auras:SetBeautyBorderColor(colour.r, colour.g, colour.b)
end
break
end
else
auraCache = 0
self.Graphics.Auras:Hide()
self.Graphics.AurasTexture:SetTexture''
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