Commit 6e1aa3b7 authored by Ivaria's avatar Ivaria
Browse files

Standard debuffs can now be ignored/blacklisted by spell ID

parent 4abaff4c
......@@ -330,7 +330,8 @@ function VUHDO_determineDebuff(aUnit)
end
if sCurChosenType ~= 6 -- VUHDO_DEBUFF_TYPE_CUSTOM
and not VUHDO_DEBUFF_BLACKLIST[tName]
and not VUHDO_DEBUFF_BLACKLIST[tName]
and not VUHDO_DEBUFF_BLACKLIST[tostring(tSpellId)]
and tIsRelevant then
if sIsUseDebuffIcon and (tIsBossDebuff or not sIsUseDebuffIconBossOnly)
......
......@@ -5,10 +5,17 @@ VUHDO_SELECTED_DEBUFF_IGNORE = "";
--
local tSpellNameById;
function VUHDO_initDebuffIgnoreComboModel()
table.wipe(VUHDO_DEBUFF_IGNORE_COMBO_MODEL);
for tName, _ in pairs(VUHDO_DEBUFF_BLACKLIST) do
tinsert(VUHDO_DEBUFF_IGNORE_COMBO_MODEL, { tName, tName });
for tName, _ in pairs(VUHDO_DEBUFF_BLACKLIST) do
tSpellNameById = VUHDO_resolveSpellId(tName);
if (tSpellNameById ~= tName) then
tinsert(VUHDO_DEBUFF_IGNORE_COMBO_MODEL, { tName, "[" .. tName .. "] " .. tSpellNameById });
else
tinsert(VUHDO_DEBUFF_IGNORE_COMBO_MODEL, { tName, tName });
end
end
end
......@@ -31,8 +38,19 @@ end
--
function VUHDO_deleteDebuffIgnoreClicked(aButton)
local tText = _G[aButton:GetParent():GetName() .. "IgnoreComboBoxEditBox"]:GetText();
if (tText ~= nil) then
VUHDO_DEBUFF_BLACKLIST[strtrim(tText)] = nil;
if (VUHDO_DEBUFF_BLACKLIST[strtrim(tText)]) then
VUHDO_DEBUFF_BLACKLIST[strtrim(tText)] = nil;
else
local tSpellId = string.match(tText, "([^\]\[]+)");
if (tSpellId ~= nil and VUHDO_DEBUFF_BLACKLIST[tSpellId]) then
VUHDO_DEBUFF_BLACKLIST[tSpellId] = nil;
end
end
VUHDO_initDebuffIgnoreComboModel();
_G[aButton:GetParent():GetName() .. "IgnoreComboBox"]:Hide();
_G[aButton:GetParent():GetName() .. "IgnoreComboBox"]:Show();
......
......@@ -19,6 +19,7 @@ Bugfixes:
Improvements:
-- Migrate minimap icon to LibDBIcon (fixes SexyMap compat)
-- Standard debuffs can now be ignored/blacklisted by spell ID
--------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment