Skip to content

Commit

Permalink
Merge pull request #675 from cleanlock/master
Browse files Browse the repository at this point in the history
Hide unwanted Debuffs by ID (Custom.lua)
  • Loading branch information
jordonwow authored Sep 9, 2023
2 parents 19d9853 + 6b20cca commit 1f8736b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
37 changes: 24 additions & 13 deletions BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
Disease = function() return IsUsableSpell(GetSpellInfo(374251)) end,
Curse = function() return IsUsableSpell(GetSpellInfo(374251)) end,
},
[1473] = { -- Augmentation Evoker
Poison = true,
Disease = function() return IsUsableSpell(GetSpellInfo(374251)) end,
Curse = function() return IsUsableSpell(GetSpellInfo(374251)) end,
},
[577] = {
Magic = function() return GetSpellInfo(205604) end, -- Reverse Magic
},
Expand Down Expand Up @@ -1829,20 +1834,26 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
local function addDebuffs(aura)
-- aura struct https://wowpedia.fandom.com/wiki/Struct_UnitAuraInfo
if (not aura) then return end
local reaction = aura.sourceUnit and UnitReaction("player", aura.sourceUnit) or 0
local friendlySmokeBomb = aura.spellId == 212183 and reaction > 4
local isDispellable = self:IsDispellable(unitId, aura.dispelName);
local size = self:GetDebuffSize(aura.spellId, isDispellable)
-- make sure certain debuffs aren't dispalyed as boss auras
if size then
aura.isBossAura = false
end
if size and not friendlySmokeBomb then
tinsert(debuffs, { aura, size, self:GetDebuffPriority(aura.spellId) })
elseif self.db.profile.raidFrames.redirectBliz then
if not frame.optionTable.displayOnlyDispellableDebuffs or isDispellable then
tinsert(debuffs, { aura, self.db.profile.raidFrames.default, 0 })
if (not BigDebuffsUnwantedSpell(aura.spellId)) then
if aura.spellId ~= unwantedSpellID then
local reaction = aura.sourceUnit and UnitReaction("player", aura.sourceUnit) or 0
local friendlySmokeBomb = aura.spellId == 212183 and reaction > 4
local isDispellable = self:IsDispellable(unitId, aura.dispelName);
local size = self:GetDebuffSize(aura.spellId, isDispellable)
-- make sure certain debuffs aren't dispalyed as boss auras
if size then
aura.isBossAura = false
end
if size and not friendlySmokeBomb then
tinsert(debuffs, { aura, size, self:GetDebuffPriority(aura.spellId) })
elseif self.db.profile.raidFrames.redirectBliz then
if not frame.optionTable.displayOnlyDispellableDebuffs or isDispellable then
tinsert(debuffs, { aura, self.db.profile.raidFrames.default, 0 })
end
end
end
else
CompactUnitFrame_HideAllDebuffs(frame)
end
end

Expand Down
5 changes: 4 additions & 1 deletion BigDebuffs_Mainline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@ addon.Spells = {
[702] = { type = DEBUFF_OFFENSIVE, nounitFrames = true, nonameplates = true }, -- Curse of Weakness
[410598] = { type = DEBUFF_OFFENSIVE, nonameplates = true }, -- Soul Rip
[417537] = { type = DEBUFF_OFFENSIVE, nonameplates = true }, -- Oblivion
[205179] = { type = DEBUFF_OFFENSIVE }, -- Phantom Singularity

-- Warrior

Expand Down Expand Up @@ -683,4 +682,8 @@ addon.Spells = {
-- Special
--[6788] = { type = "special", nounitFrames = true, noraidFrames = true }, -- Weakened Soul

-- Dragonflight Dungeons - Season 2
[266107] = { type = DEBUFF_OFFENSIVE }, -- Thirst for Blood
[368091] = { type = DEBUFF_OFFENSIVE }, -- Infected Bite

}
20 changes: 20 additions & 0 deletions Custom.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- Table for function "addDebuffs(aura)" in BigDebuffs Code
BigDebuffsUnwantedSpells = {
80354, -- Temporal Displacement
371070, -- Rotting From Within
390435, -- Exhaustion
57723, -- Exhaustion
206151, -- Challenger's Burden
264689, -- Fatigued
}

-- Iterate through unwanted debuffs
function BigDebuffsUnwantedSpell(spellId)
for _, unwantedSpellID in ipairs(BigDebuffsUnwantedSpells) do
if unwantedSpellID == spellId then
return true
end
end

return false
end

0 comments on commit 1f8736b

Please sign in to comment.