Quantcast

add raid debuff watch

rawoil [06-29-21 - 10:35]
add raid debuff watch
Filename
oUF_Simple/core/functions.lua
oUF_Simple/core/style.lua
oUF_Simple/modules/oUF_RaidDebuffs.lua
oUF_Simple/oUF_Simple.toc
oUF_Simple/templates/raid.lua
oUF_SimpleConfig/debuffs.lua
oUF_SimpleConfig/oUF_SimpleConfig.toc
oUF_SimpleConfig/raid.lua
diff --git a/oUF_Simple/core/functions.lua b/oUF_Simple/core/functions.lua
index ffe5af5..9b5d3cb 100644
--- a/oUF_Simple/core/functions.lua
+++ b/oUF_Simple/core/functions.lua
@@ -433,6 +433,30 @@ local function CreateRaidMark(self)
 end
 L.F.CreateRaidMark = CreateRaidMark

+local function CreateRaidDebuffs(self)
+  if not self.cfg.debuffwatch or not self.cfg.debuffwatch.enabled then return end
+  local cfg = self.cfg.debuffwatch
+  local frame = CreateFrame("Frame", nil, self)
+  SetPoint(frame,self.Health,cfg.point)
+  frame:SetSize(cfg.size,cfg.size)
+  frame:SetFrameLevel(self.Health:GetFrameLevel() + 10)
+  frame.Backdrop = CreateBackdrop(frame) -- create backdrop
+  frame.icon = frame:CreateTexture(nil, "ARTWORK")
+  frame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+  frame.count:SetFont(L.C.fonts.expressway, cfg.size/2, "OUTLINE")
+  frame.count:SetShadowColor(0,0,0,0.6)
+  frame.count:SetShadowOffset(1,-1)
+  frame.count:ClearAllPoints()
+  frame.count:SetPoint("BOTTOMRIGHT", cfg.size/10, -cfg.size/10)
+  frame.onlyMatchSpellID = true
+  frame.showDispellableDebuff = true
+  frame.time = frame:CreateFontString(nil, "OVERLAY")
+  frame.time:SetFont(L.C.fonts.expressway, cfg.size/1.65, "OUTLINE")
+  frame.time:SetPoint("CENTER",frame,1,0)
+  return frame
+end
+L.F.CreateRaidDebuffs = CreateRaidDebuffs
+
 --CreateNameText
 local function CreateNameText(self)
   if not self.cfg.healthbar or not self.cfg.healthbar.name or not self.cfg.healthbar.name.enabled then return end
@@ -483,7 +507,7 @@ local function PostCreateAura(self,button)
   bg:SetPoint("TOPLEFT", -self.size/4, self.size/4)
   bg:SetPoint("BOTTOMRIGHT", self.size/4, -self.size/4)
   button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-  button.count:SetFont(STANDARD_TEXT_FONT, self.size/1.65, "OUTLINE")
+  button.count:SetFont(L.C.fonts.expressway, self.size/1.65, "OUTLINE")
   button.count:SetShadowColor(0,0,0,0.6)
   button.count:SetShadowOffset(1,-1)
   button.count:ClearAllPoints()
diff --git a/oUF_Simple/core/style.lua b/oUF_Simple/core/style.lua
index 2157ad2..45cb4cf 100644
--- a/oUF_Simple/core/style.lua
+++ b/oUF_Simple/core/style.lua
@@ -38,5 +38,6 @@ local function CreateStyle(self)
   self.Debuffs = L.F.CreateDebuffs(self)
   self.Buffs = L.F.CreateBuffs(self)
   self.RaidTargetIndicator = L.F.CreateRaidMark(self)
+  self.RaidDebuffs = L.F.CreateRaidDebuffs(self)
 end
 L.F.CreateStyle = CreateStyle
\ No newline at end of file
diff --git a/oUF_Simple/modules/oUF_RaidDebuffs.lua b/oUF_Simple/modules/oUF_RaidDebuffs.lua
new file mode 100644
index 0000000..ff9fca9
--- /dev/null
+++ b/oUF_Simple/modules/oUF_RaidDebuffs.lua
@@ -0,0 +1,335 @@
+local _, ns = ...
+local oUF = ns.oUF or oUF
+
+local _G = _G
+local addon = {}
+ns.oUF_RaidDebuffs = addon
+_G.oUF_RaidDebuffs = ns.oUF_RaidDebuffs
+if not _G.oUF_RaidDebuffs then
+	_G.oUF_RaidDebuffs = addon
+end
+
+local format, floor = format, floor
+local type, pairs, wipe = type, pairs, wipe
+
+local GetActiveSpecGroup = GetActiveSpecGroup
+local GetSpecialization = GetSpecialization
+local GetSpellInfo = GetSpellInfo
+local GetTime = GetTime
+local UnitAura = UnitAura
+local UnitCanAttack = UnitCanAttack
+local UnitIsCharmed = UnitIsCharmed
+
+local debuff_data = {}
+addon.DebuffData = debuff_data
+addon.ShowDispellableDebuff = true
+addon.FilterDispellableDebuff = true
+addon.MatchBySpellName = false
+addon.priority = 10
+
+local function add(spell, priority, stackThreshold)
+	if addon.MatchBySpellName and type(spell) == 'number' then
+		spell = GetSpellInfo(spell)
+	end
+
+	if(spell) then
+		debuff_data[spell] = {
+			priority = (addon.priority + priority),
+			stackThreshold = (stackThreshold or 0),
+		}
+	end
+end
+
+function addon:RegisterDebuffs(t)
+	for spell, value in pairs(t) do
+		if type(t[spell]) == 'boolean' then
+			local oldValue = t[spell]
+			t[spell] = { enable = oldValue, priority = 0, stackThreshold = 0 }
+		else
+			if t[spell].enable then
+				add(spell, t[spell].priority, t[spell].stackThreshold)
+			end
+		end
+	end
+end
+
+function addon:ResetDebuffData()
+	wipe(debuff_data)
+end
+
+local DispellColor = {
+	['Magic']	= {.2, .6, 1},
+	['Curse']	= {.6, 0, 1},
+	['Disease']	= {.6, .4, 0},
+	['Poison']	= {0, .6, 0},
+	['none'] = {1, 0, 0},
+}
+
+local DispellPriority = {
+	['Magic']	= 4,
+	['Curse']	= 3,
+	['Disease']	= 2,
+	['Poison']	= 1,
+}
+
+local DispellFilter
+do
+	local dispellClasses = {
+		['PRIEST'] = {
+			['Magic'] = true,
+			['Disease'] = true,
+		},
+		['SHAMAN'] = {
+			['Magic'] = false,
+			['Curse'] = oUF.Retail and true or false,
+			['Poison'] = true,
+			['Disease'] = true,
+		},
+		['PALADIN'] = {
+			['Poison'] = true,
+			['Magic'] = true,
+			['Disease'] = true,
+		},
+		['DRUID'] = {
+			['Magic'] = false,
+			['Curse'] = true,
+			['Poison'] = true,
+			['Disease'] = false,
+		},
+		['MAGE'] = {
+			['Curse'] = true,
+		},
+		['MONK'] = {
+			['Magic'] = false,
+			['Disease'] = true,
+			['Poison'] = true,
+		},
+	}
+
+	DispellFilter = dispellClasses[select(2, UnitClass('player'))] or {}
+end
+
+local function CheckTalentTree(tree)
+	local activeGroup = GetActiveSpecGroup()
+	if activeGroup and GetSpecialization(false, false, activeGroup) then
+		return tree == GetSpecialization(false, false, activeGroup)
+	end
+end
+
+local playerClass = select(2, UnitClass('player'))
+local function CheckSpec(self, event, levels)
+	-- Not interested in gained points from leveling
+	if event == "CHARACTER_POINTS_CHANGED" and levels > 0 then return end
+
+	--Check for certain talents to see if we can dispel magic or not
+	if playerClass == "PALADIN" then
+		if CheckTalentTree(1) then
+			DispellFilter.Magic = true
+		else
+			DispellFilter.Magic = false
+		end
+	elseif playerClass == "SHAMAN" then
+		if CheckTalentTree(3) then
+			DispellFilter.Magic = true
+		else
+			DispellFilter.Magic = false
+		end
+	elseif playerClass == "DRUID" then
+		if CheckTalentTree(4) then
+			DispellFilter.Magic = true
+		else
+			DispellFilter.Magic = false
+		end
+	elseif playerClass == "MONK" then
+		if CheckTalentTree(2) then
+			DispellFilter.Magic = true
+		else
+			DispellFilter.Magic = false
+		end
+	end
+end
+
+local function formatTime(s)
+	if s > 60 then
+		return format('%dm', s/60), s%60
+	elseif s < 1 then
+		return format("%.1f", s), s - floor(s)
+	else
+		return format('%d', s), s - floor(s)
+	end
+end
+
+local abs = math.abs
+local function OnUpdate(self, elapsed)
+	self.elapsed = (self.elapsed or 0) + elapsed
+	if self.elapsed >= 0.1 then
+		local timeLeft = self.endTime - GetTime()
+		if self.reverse then timeLeft = abs((self.endTime - GetTime()) - self.duration) end
+		if timeLeft > 0 then
+			local text = formatTime(timeLeft)
+			self.time:SetText(text)
+		else
+			self:SetScript('OnUpdate', nil)
+			self.time:Hide()
+		end
+		self.elapsed = 0
+	end
+end
+
+local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTime, spellId, stackThreshold)
+	local f = self.RaidDebuffs
+
+	if name and (count >= stackThreshold) then
+		f.icon:SetTexture(icon)
+		f.icon:Show()
+		f.duration = duration
+
+		if f.count then
+			if count and (count > 1) then
+				f.count:SetText(count)
+				f.count:Show()
+			else
+				f.count:SetText("")
+				f.count:Hide()
+			end
+		end
+
+		if f.time then
+			if duration and (duration > 0) and f:GetSize() > 20 then
+				f.endTime = endTime
+				f.nextUpdate = 0
+				f:SetScript('OnUpdate', OnUpdate)
+				f.time:Show()
+			else
+				f:SetScript('OnUpdate', nil)
+				f.time:Hide()
+			end
+		end
+
+		if f.cd then
+			if duration and (duration > 0) then
+				f.cd:SetCooldown(endTime - duration, duration)
+				f.cd:Show()
+			else
+				f.cd:Hide()
+			end
+		end
+
+		local c = DispellColor[debuffType] or DispellColor.none
+
+		if f.Backdrop then
+			f.Backdrop:SetBorderColor(c[1], c[2], c[3])
+		else
+			f:SetBackdropBorderColor(c[1], c[2], c[3])
+		end
+
+		f:Show()
+	else
+		f:Hide()
+	end
+end
+
+local function Update(self, event, unit)
+	if unit ~= self.unit then return end
+	local _name, _icon, _count, _dtype, _duration, _endTime, _spellId, _
+	local _priority, priority = 0, 0
+	local _stackThreshold = 0
+
+	--store if the unit its charmed, mind controlled units (Imperial Vizier Zor'lok: Convert)
+	local isCharmed = UnitIsCharmed(unit)
+
+	--store if we cand attack that unit, if its so the unit its hostile (Amber-Shaper Un'sok: Reshape Life)
+	local canAttack = UnitCanAttack("player", unit)
+
+	for i = 1, 40 do
+		local name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff = UnitAura(unit, i, 'HARMFUL')
+		if (not name) then break end
+
+		--we coudln't dispell if the unit its charmed, or its not friendly
+		if addon.ShowDispellableDebuff and (self.RaidDebuffs.showDispellableDebuff ~= false) and debuffType and (not isCharmed) and (not canAttack) then
+
+			if addon.FilterDispellableDebuff then
+				DispellPriority[debuffType] = (DispellPriority[debuffType] or 0) + addon.priority --Make Dispell buffs on top of Boss Debuffs
+				priority = DispellFilter[debuffType] and DispellPriority[debuffType] or 0
+				if priority == 0 then
+					debuffType = nil
+				end
+			else
+				priority = DispellPriority[debuffType] or 0
+			end
+
+			if priority > _priority then
+				_priority, _name, _icon, _count, _dtype, _duration, _endTime, _spellId = priority, name, icon, count, debuffType, duration, expirationTime, spellId
+			end
+		end
+
+		local debuff
+		if self.RaidDebuffs.onlyMatchSpellID then
+			debuff = debuff_data[spellId]
+		else
+			if debuff_data[spellId] then
+				debuff = debuff_data[spellId]
+			else
+				debuff = debuff_data[name]
+			end
+		end
+
+		priority = debuff and debuff.priority
+		if priority and not self.RaidDebuffs.BlackList[spellId] and (priority > _priority) then
+			_priority, _name, _icon, _count, _dtype, _duration, _endTime, _spellId = priority, name, icon, count, debuffType, duration, expirationTime, spellId
+		end
+	end
+
+	if self.RaidDebuffs.forceShow then
+		_spellId = 47540
+		_name, _, _icon = GetSpellInfo(_spellId)
+		_count, _dtype, _duration, _endTime, _stackThreshold = 5, 'Magic', 0, 60, 0
+	end
+
+	if _name then
+		_stackThreshold = debuff_data[addon.MatchBySpellName and _name or _spellId] and debuff_data[addon.MatchBySpellName and _name or _spellId].stackThreshold or _stackThreshold
+	end
+
+	UpdateDebuff(self, _name, _icon, _count, _dtype, _duration, _endTime, _spellId, _stackThreshold)
+
+	--Reset the DispellPriority
+	DispellPriority['Magic'] = 4
+	DispellPriority['Curse'] = 3
+	DispellPriority['Disease'] = 2
+	DispellPriority['Poison'] = 1
+end
+
+local function Enable(self)
+	if self.RaidDebuffs then
+		if oUF.Retail then
+			self:RegisterEvent("PLAYER_TALENT_UPDATE", CheckSpec, true)
+			self:RegisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec, true)
+		end
+
+		self:RegisterEvent('UNIT_AURA', Update)
+
+		self.RaidDebuffs.BlackList = self.RaidDebuffs.BlackList or {
+			[105171] = true, -- Deep Corruption
+			[108220] = true, -- Deep Corruption
+			[116095] = true, -- Disable, Slow
+			[137637] = true, -- Warbringer, Slow
+		}
+
+		return true
+	end
+end
+
+local function Disable(self)
+	if self.RaidDebuffs then
+		if oUF.Retail then
+			self:UnregisterEvent("PLAYER_TALENT_UPDATE", CheckSpec, true)
+			self:UnregisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec, true)
+		end
+
+		self:UnregisterEvent('UNIT_AURA', Update)
+
+		self.RaidDebuffs:Hide()
+	end
+end
+
+oUF:AddElement('RaidDebuffs', Update, Enable, Disable)
\ No newline at end of file
diff --git a/oUF_Simple/oUF_Simple.toc b/oUF_Simple/oUF_Simple.toc
index 9ea8a53..8f93888 100644
--- a/oUF_Simple/oUF_Simple.toc
+++ b/oUF_Simple/oUF_Simple.toc
@@ -8,6 +8,7 @@
 modules\rClassBar.lua
 modules\oUF_DebuffHighlight.lua
 modules\oUF_Swing.lua
+modules\oUF_RaidDebuffs.lua

 core\init.lua
 core\functions.lua
diff --git a/oUF_Simple/templates/raid.lua b/oUF_Simple/templates/raid.lua
index c321d19..66ad2fa 100644
--- a/oUF_Simple/templates/raid.lua
+++ b/oUF_Simple/templates/raid.lua
@@ -34,6 +34,36 @@ local function DisableBlizzard()
 	end
 end

+function UpdateRaidDebuffIndicator()
+	local ORD = L.oUF_RaidDebuffs or oUF_RaidDebuffs
+
+	if (ORD) then
+		local _, InstanceType = IsInInstance()
+
+		ORD:ResetDebuffData()
+
+		if (InstanceType == "party" or InstanceType == "raid") then
+			ORD:RegisterDebuffs(L.C.debuffs.PvE.spells)
+		else
+			ORD:RegisterDebuffs(L.C.debuffs.PvP.spells)
+		end
+	end
+end
+
+local function SetupRaidDebuffs()
+  local ORD = L.oUF_RaidDebuffs or oUF_RaidDebuffs
+  local RaidDebuffs = CreateFrame("Frame")
+
+  RaidDebuffs:RegisterEvent("PLAYER_ENTERING_WORLD")
+  RaidDebuffs:SetScript("OnEvent", UpdateRaidDebuffIndicator)
+
+  if (ORD) then
+    ORD.ShowDispellableDebuff = L.C.raid.debuffwatch.dispellable
+    ORD.FilterDispellableDebuff = L.C.raid.debuffwatch.filterOnly
+    ORD.MatchBySpellName = L.C.raid.debuffwatch.matchByName
+  end
+end
+
 local function CreateRaidStyle(self)
   --disable blizzard
   DisableBlizzard()
@@ -47,5 +77,9 @@ local function CreateRaidStyle(self)
   self.settings.createDrag = false
   --style
   L.F.CreateStyle(self)
+  --setup debuffs
+  if L.C.raid.debuffwatch and L.C.raid.debuffwatch.enabled then
+    SetupRaidDebuffs()
+  end
 end
 L.F.CreateRaidStyle = CreateRaidStyle
\ No newline at end of file
diff --git a/oUF_SimpleConfig/debuffs.lua b/oUF_SimpleConfig/debuffs.lua
new file mode 100644
index 0000000..1fe5381
--- /dev/null
+++ b/oUF_SimpleConfig/debuffs.lua
@@ -0,0 +1,376 @@
+-- oUF_SimpleConfig: debuffs for oUF_RaidDebuffs
+-- rawoil, 2021
+-- all data from tukui
+
+-----------------------------
+-- Variables
+-----------------------------
+
+local A, L = ...
+
+local Debuffs = {}
+local Priority = function(priorityOverride) return {["enable"] = true, ["priority"] = priorityOverride or 0, ["stackThreshold"] = 0} end
+
+------------------------------------------------------------------------------------
+-- RAID DEBUFFS (DEFAULT LISTING)
+------------------------------------------------------------------------------------
+Debuffs["PvE"] = {
+    ["type"] = "Whitelist",
+    ["spells"] = {
+
+    ---------------
+    -- Pre-Patch --
+    ---------------
+
+        -- Onyxia's Lair
+            [18431] = Priority(2), --Bellowing Roar
+        -- Molten Core
+            [19703] = Priority(2), --Lucifron's Curse
+            [19408] = Priority(2), --Panic
+            [19716] = Priority(2), --Gehennas' Curse
+            [20277] = Priority(2), --Fist of Ragnaros
+            [20475] = Priority(6), --Living Bomb
+            [19695] = Priority(6), --Inferno
+            [19659] = Priority(2), --Ignite Mana
+            [19714] = Priority(2), --Deaden Magic
+            [19713] = Priority(2), --Shazzrah's Curse
+        -- Blackwing's Lair
+            [23023] = Priority(2), --Conflagration
+            [18173] = Priority(2), --Burning Adrenaline
+            [24573] = Priority(2), --Mortal Strike
+            [23340] = Priority(2), --Shadow of Ebonroc
+            [23170] = Priority(2), --Brood Affliction: Bronze
+            [22687] = Priority(2), --Veil of Shadow
+        -- Zul'Gurub
+            [23860] = Priority(2), --Holy Fire
+            [22884] = Priority(2), --Psychic Scream
+            [23918] = Priority(2), --Sonic Burst
+            [24111] = Priority(2), --Corrosive Poison
+            [21060] = Priority(2), --Blind
+            [24328] = Priority(2), --Corrupted Blood
+            [16856] = Priority(2), --Mortal Strike
+            [24664] = Priority(2), --Sleep
+            [17172] = Priority(2), --Hex
+            [24306] = Priority(2), --Delusions of Jin'do
+            [24099] = Priority(2), --Poison Bolt Volley
+        -- Ahn'Qiraj Ruins
+            [25646] = Priority(2), --Mortal Wound
+            [25471] = Priority(2), --Attack Order
+            [96] = Priority(2), --Dismember
+            [25725] = Priority(2), --Paralyze
+            [25189] = Priority(2), --Enveloping Winds
+        -- Ahn'Qiraj Temple
+            [785] = Priority(2), --True Fulfillment
+            [26580] = Priority(2), --Fear
+            [26050] = Priority(2), --Acid Spit
+            [26180] = Priority(2), --Wyvern Sting
+            [26053] = Priority(2), --Noxious Poison
+            [26613] = Priority(2), --Unbalancing Strike
+            [26029] = Priority(2), --Dark Glare
+        -- Naxxramas
+            [28732] = Priority(2), --Widow's Embrace
+            [28622] = Priority(2), --Web Wrap
+            [28169] = Priority(2), --Mutating Injection
+            [29213] = Priority(2), --Curse of the Plaguebringer
+            [28835] = Priority(2), --Mark of Zeliek
+            [27808] = Priority(2), --Frost Blast
+            [28410] = Priority(2), --Chains of Kel'Thuzad
+            [27819] = Priority(2), --Detonate Mana
+
+    -------------
+    -- Phase 1 --
+    -------------
+
+    -- Karazhan
+        -- Trash
+            [29679] = Priority(4), -- Bad Poetry
+            [29505] = Priority(3), -- Banshee Shriek
+            [32441] = Priority(4), -- Brittle Bones
+            [29690] = Priority(5), -- Drunken Skull Crack
+            [29321] = Priority(4), -- Fear
+            [29935] = Priority(4), -- Gaping Maw
+            [29670] = Priority(5), -- Ice Tomb
+            [29491] = Priority(4), -- Impending Betrayal
+            [41580] = Priority(3), -- Net
+            [29676] = Priority(5), -- Rolling Pin
+            [29490] = Priority(5), -- Seduction
+            [29684] = Priority(5), -- Shield Slam
+            [29300] = Priority(5), -- Sonic Blast
+            [29900] = Priority(5), -- Unstable Magic (Good Debuff)
+        -- Attumen the Huntsman
+            [29833] = Priority(3), -- Intangible Presence
+            [29711] = Priority(4), -- Knockdown
+        -- Moroes
+            [34694] = Priority(4), -- Blind
+            [37066] = Priority(5), -- Garrote
+            [29425] = Priority(4), -- Gouge
+            [13005] = Priority(3), -- Hammer of Justice (Baron Rafe Dreuger)
+            [29572] = Priority(3), -- Mortal Strike (Lord Robin Daris)
+        -- Maiden of Virtue
+            [29522] = Priority(3), -- Holy Fire
+            [29511] = Priority(4), -- Repentance
+        -- Animal Bosses
+        -- Hyakiss the Lurker
+            [29901] = Priority(3), -- Acidic Fang
+            [29896] = Priority(4), -- Hyakiss' Web
+        -- Rokad the Ravager
+            [29906] = Priority(3), -- Ravage
+        -- Shadikith the Glider
+            [29903] = Priority(4), -- Dive
+            [29904] = Priority(3), -- Sonic Burst
+        -- Opera Event (Wizard of Oz)
+            [31042] = Priority(5), -- Shred Armor
+            [31046] = Priority(4), -- Brain Bash
+        -- Opera Event (The Big Bad Wolf)
+            [30753] = Priority(5), -- Red Riding Hood
+            [30752] = Priority(3), -- Terrifying Howl
+            [30761] = Priority(4), -- Wide Swipe
+        -- Opera Event (Romulo and Julianne)
+            [30890] = Priority(3), -- Blinding Passion
+            [30822] = Priority(4), -- Poisoned Thrust
+            [30889] = Priority(5), -- Powerful Attraction
+        -- The Curator
+        -- Shade of Aran
+            [29991] = Priority(5), -- Chains of Ice
+            [29954] = Priority(3), -- Frostbolt
+            [30035] = Priority(4), -- Mass Slow
+            [29990] = Priority(5), -- Slow
+        -- Terestian Illhoof
+            [30053] = Priority(3), -- Amplify Flames
+            [30115] = Priority(4), -- Sacrifice
+        -- Netherspite
+            [37063] = Priority(3), -- Void Zone
+        -- Chess Event
+        -- Prince Malchezaar
+            [39095] = Priority(3), -- Amplify Damage
+            [30843] = Priority(5), -- Enfeeble
+            [30854] = Priority(4), -- Shadow Word: Pain (Tank)
+            [30898] = Priority(4), -- Shadow Word: Pain (Raid)
+            [30901] = Priority(3), -- Sunder Armor
+        -- Nightbane
+            [36922] = Priority(5), -- Bellowing Roar
+            [30129] = Priority(6), -- Charred Earth
+            [30130] = Priority(3), -- Distracting Ash
+            [37098] = Priority(5), -- Rain of Bones
+            [30127] = Priority(4), -- Searing Cinders
+            [30210] = Priority(3), -- Smoldering Breath
+            [25653] = Priority(3), -- Tail Sweep
+    -- Gruul's Lair
+        -- Trash
+            [22884] = Priority(4), -- Psychic Scream
+        -- High King Maulgar
+        -- Blindeye the Seer
+        -- Kiggler the Crazed
+            [33175] = Priority(3), -- Arcane Shock
+            [33173] = Priority(5), -- Greater Polymorph
+        -- Krosh Firehand
+            [33061] = Priority(3), -- Blast Wave
+        -- Olm the Summoner
+            [33129] = Priority(4), -- Dark Decay
+            [33130] = Priority(5), -- Death Coil
+        -- High King Maulgar
+            [16508] = Priority(5), -- Intimidating Roar
+        -- Gruul the Dragonkiller
+            [36240] = Priority(4), -- Cave In
+    -- Magtheridon's Lair
+        -- Trash
+            [34437] = Priority(4), -- Death Coil
+            [34435] = Priority(3), -- Rain of Fire
+            [34439] = Priority(5), -- Unstable Affliction
+        -- Magtheridon
+            [30410] = Priority(3), -- Shadow Grasp
+
+    -------------
+    -- Phase 2 --
+    -------------
+
+    -- Serpentshrine Cavern
+        -- Trash
+            [38634] = Priority(3), -- Arcane Lightning
+            [39032] = Priority(4), -- Initial Infection
+            [38572] = Priority(3), -- Mortal Cleave
+            [38635] = Priority(3), -- Rain of Fire
+            [39042] = Priority(5), -- Rampent Infection
+            [39044] = Priority(4), -- Serpentshrine Parasite
+            [38591] = Priority(4), -- Shatter Armor
+            [38491] = Priority(3), -- Silence
+        -- Hydross the Unstable
+            [38246] = Priority(3), -- Vile Sludge
+            [38235] = Priority(4), -- Water Tomb
+        -- The Lurker Below
+        -- Morogrim Tidewalker
+            [38049] = Priority(4), -- Watery Grave
+            [37850] = Priority(4), -- Watery Grave
+        -- Fathom-Lord Karathress
+            [39261] = Priority(3), -- Gusting Winds
+            [29436] = Priority(4), -- Leeching Throw
+        -- Leotheras the Blind
+            [37675] = Priority(3), -- Chaos Blast
+            [37749] = Priority(5), -- Consuming Madness
+            [37676] = Priority(4), -- Insidious Whisper
+            [37641] = Priority(3), -- Whirlwind
+        -- Lady Vashj
+            [38316] = Priority(3), -- Entangle
+            [38280] = Priority(5), -- Static Charge
+    -- Tempest Keep: The Eye
+        -- Trash
+            [37133] = Priority(4), -- Arcane Buffet
+            [37132] = Priority(3), -- Arcane Shock
+            [37122] = Priority(5), -- Domination
+            [37135] = Priority(5), -- Domination
+            [37120] = Priority(4), -- Fragmentation Bomb
+            [13005] = Priority(3), -- Hammer of Justice
+            [39077] = Priority(3), -- Hammer of Justice
+            [37279] = Priority(3), -- Rain of Fire
+            [37123] = Priority(4), -- Saw Blade
+            [37118] = Priority(5), -- Shell Shock
+            [37160] = Priority(3), -- Silence
+        -- Al'ar
+            [35410] = Priority(4), -- Melt Armor
+        -- Void Reaver
+        -- High Astromancer Solarian
+            [34322] = Priority(4), -- Psychic Scream
+            [42783] = Priority(5), -- Wrath of the Astromancer (Patch 2.2.0)
+        -- Kael'thas Sunstrider
+            [36965] = Priority(4), -- Rend
+            [30225] = Priority(4), -- Silence
+            [44863] = Priority(5), -- Bellowing Roar
+            [37018] = Priority(4), -- Conflagration
+            [37027] = Priority(5), -- Remote Toy
+            [36991] = Priority(4), -- Rend
+            [36797] = Priority(5), -- Mind Control
+
+    -------------
+    -- Phase 3 --
+    -------------
+
+    -- The Battle for Mount Hyjal
+        -- Rage Winterchill
+        -- Anetheron
+        -- Kaz'rogal
+        -- Azgalor
+        -- Archimonde
+    -- Black Temple
+        -- High Warlord Naj'entus
+        -- Supremus
+        -- Shade of Akama
+        -- Teron Gorefiend
+        -- Gurtogg Bloodboil
+        -- Reliquary of Souls
+        -- Mother Shahraz
+        -- Illidari Council
+        -- Illidan Stormrage
+
+    -------------
+    -- Phase 4 --
+    -------------
+
+    -- Zul'Aman
+        -- Nalorakk
+        -- Jan'alai
+        -- Akil'zon
+        -- Halazzi
+        -- Hexxlord Jin'Zakk
+        -- Zul'jin
+
+    -------------
+    -- Phase 5 --
+    -------------
+
+    -- Sunwell Plateau
+        -- Kalecgos
+        -- Sathrovarr
+        -- Brutallus
+        -- Felmyst
+        -- Alythess
+        -- Sacrolash
+        -- M'uru
+        -- Kil'Jaeden
+    },
+}
+
+Debuffs["PvP"] = {
+    ["type"] = "Whitelist",
+    ["spells"] = {
+    -- Druid
+        [5211] = Priority(3), -- Bash
+        [16922] = Priority(3), -- Celestial Focus
+        [33786] = Priority(3), -- Cyclone
+        [339] = Priority(2), -- Entangling Roots
+        [19975] = Priority(2), -- Entangling Roots (Nature's Grasp)
+        [45334] = Priority(2), -- Feral Charge Effect
+        [2637] = Priority(3), -- Hibernate
+        [22570] = Priority(3), -- Maim
+        [9005] = Priority(3), -- Pounce
+    -- Hunter
+        [19306] = Priority(2), -- Counterattack
+        [19185] = Priority(2), -- Entrapment
+        [3355] = Priority(3), -- Freezing Trap
+        [2637] = Priority(3), -- Hibernate
+        [19410] = Priority(3), -- Improved Concussive Shot
+        [19229] = Priority(2), -- Improved Wing Clip
+        [24394] = Priority(3), -- Intimidation
+        [19503] = Priority(3), -- Scatter Shot
+        [34490] = Priority(3), -- Silencing Shot
+        [4167] = Priority(2), -- Web (Pet)
+        [19386] = Priority(3), -- Wyvern Sting
+    -- Mage
+        [31661] = Priority(3), -- Dragon's Breath
+        [33395] = Priority(2), -- Freeze (Water Elemental)
+        [12494] = Priority(2), -- Frostbite
+        [122] = Priority(2), -- Frost Nova
+        [12355] = Priority(3), -- Impact
+        [118] = Priority(3), -- Polymorph
+        [28272] = Priority(3), -- Polymorph: Pig
+        [28271] = Priority(3), -- Polymorph: Turtle
+        [18469] = Priority(3), -- Silenced - Improved Counterspell
+    -- Paladin
+        [853] = Priority(3), -- Hammer of Justice
+        [20066] = Priority(3), -- Repentance
+        [20170] = Priority(3), -- Stun (Seal of Justice Proc)
+        [10326] = Priority(3), -- Turn Evil
+        [2878] = Priority(3), -- Turn Undead
+    -- Priest
+        [15269] = Priority(3), -- Blackout
+        [44041] = Priority(3), -- Chastise
+        [605] = Priority(3), -- Mind Control
+        [8122] = Priority(3), -- Psychic Scream
+        [9484] = Priority(3), -- Shackle Undead
+        [15487] = Priority(3), -- Silence
+    -- Rogue
+        [2094] = Priority(3), -- Blind
+        [1833] = Priority(3), -- Cheap Shot
+        [32747] = Priority(3), -- Deadly Throw Interrupt
+        [1330] = Priority(3), -- Garrote - Silence
+        [1776] = Priority(3), -- Gouge
+        [408] = Priority(3), -- Kidney Shot
+        [14251] = Priority(3), -- Riposte
+        [6770] = Priority(3), -- Sap
+        [18425] = Priority(3), -- Silenced - Improved Kick
+    -- Warlock
+        [6789] = Priority(3), -- Death Coil
+        [5782] = Priority(3), -- Fear
+        [5484] = Priority(3), -- Howl of Terror
+        [30153] = Priority(3), -- Intercept Stun (Felguard)
+        [18093] = Priority(3), -- Pyroclasm
+        [6358] = Priority(3), -- Seduction (Succubus)
+        [30283] = Priority(3), -- Shadowfury
+        [24259] = Priority(3), -- Spell Lock (Felhunter)
+    -- Warrior
+        [7922] = Priority(3), -- Charge Stun
+        [12809] = Priority(3), -- Concussion Blow
+        [676] = Priority(3), -- Disarm
+        [23694] = Priority(2), -- Improved Hamstring
+        [5246] = Priority(3), -- Intimidating Shout
+        [20253] = Priority(3), -- Intercept Stun
+        [12798] = Priority(3), -- Revenge Stun
+        [18498] = Priority(3), -- Shield Bash - Silenced
+    -- Racial
+        [28730]  = Priority(3), -- Arcane Torrent
+        [20549] = Priority(3), -- War Stomp
+    -- Others
+        [5530] = Priority(3), -- Mace Specialization
+    },
+}
+
+L.C.debuffs = Debuffs
\ No newline at end of file
diff --git a/oUF_SimpleConfig/oUF_SimpleConfig.toc b/oUF_SimpleConfig/oUF_SimpleConfig.toc
index c0d2816..a103a94 100644
--- a/oUF_SimpleConfig/oUF_SimpleConfig.toc
+++ b/oUF_SimpleConfig/oUF_SimpleConfig.toc
@@ -16,4 +16,5 @@ mouseover.lua
 party.lua
 boss.lua
 nameplate.lua
-raid.lua
\ No newline at end of file
+raid.lua
+debuffs.lua
\ No newline at end of file
diff --git a/oUF_SimpleConfig/raid.lua b/oUF_SimpleConfig/raid.lua
index a5edb65..93dd4e1 100644
--- a/oUF_SimpleConfig/raid.lua
+++ b/oUF_SimpleConfig/raid.lua
@@ -52,6 +52,15 @@ L.C.raid = {
     size = {18,18},
     point = {"CENTER","TOP",0,0},
   },
+  --debuff watch
+  debuffwatch = {
+    enabled = true,
+    dispellable = true,
+    filterOnly = true,
+    matchByName = false,
+    point = {"CENTER","CENTER",0,0},
+    size = 22,
+  },
   setup = {
     template = nil,
     visibility = "custom [group:raid] show; hide",