Hello,
1. i'd like to filter debuffs on raidmembers by name/spellid.
2. only one debuff should be shown.
but now there is a problem when the first debuff of a raidmember is hidden, no other debuff will be shown (i.e.: Chill of Throne debuff in icecrown is hidden and no debuff from my whitelist will be shown)
therefore i thought i re-sort the debuffs based on being on my whitelist or not (debuffs on list before debuffs not on list)
Code:
local filter = {
["Aufgespießt"] = true, -- Impaled (Lord Marrowgar)
["Fluch der Starre"] = true, -- Curse of Torpor (Lady Deathwhisper)
["Mal des gefallenen Champions"] = true, -- Mark of the Fallen Champion (Deathbringer Saurfang)
["Rune des Blutes"] = true, -- Rune of Blood (Deathbringer Saurfang)
["Gasspore"] = true, -- Gas Spore (Festergut)
["Mutierte Infektion"] = true, -- Mutated Infection (Rotface)
["Pakt der Sinistren"] = true, -- Pact of the Darkfallen (Blood-Queen Lana'thel)
["Schw\195\164rmende Schatten"] = true, -- Swarming Shadows (Blood-Queen Lana'thel)
["Frostleuchtfeuer"] = true, -- Frost Beacon (Sindragosa)
["Nekrotische Seuche"] = true, -- Necrotic Plague (Arthas)
["Seele ernten"] = true, -- Harvest Soul (Arthas)
["K\195\164lte des Thrones"] = true, -- testing
--["K\195\188rzlich bandagiert"] = true, -- testing
["Seltsame Aura"] = true, -- Strange Aura (Zone-Debuff, just for testing)
}
local CustomAuraFilter = function(icons, unit, icon, name, rank, texture, count, dtype)
if icon.debuff then
if filter[name] then
return true
end
end
end
but i dont know how to sort debuffs by name
Code:
local AuraSort = function(a,b)
if a.name == filter[name] then
??
end
end
local function preAuraSetPosition(self,debuffs,max)
table.sort(debuffs,AuraSort)
end
example:
before filtering
1. Debuff A (not in list but shown)
2. Debuff B (in list and shown)
after filtering (more then 1 debuff shown)
1. Debuff A (not in list not shown)
2. Debuff B (in list and shown)
after filtering (only 1 debuff shown)
1. Debuff A (not in list not shown)
2. Debuff B (in list and not shown (because this debuff is not the 1.))
after re-sorting and filtering (only 1 debuff shown)
1. Debuff B (in list and shown)
2. Debuff A (not in list not shown)
maybe there is a much better solution for that problem. so please help
tia