![]() |
Debuff filtering
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 = { Code:
local AuraSort = function(a,b) 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 |
I just blacklist debuffs that I don't want to show (see oUF_viv). Shouldn't that do the trick for your needs, too? It's pretty much enough for PvE at least.
I'm currently writing another layout for PvP (arena to be specific). Which will filter out everything but some whitelist'ed buffs and debuffs. It's the same code though. |
1.
Your Quote:
Quote:
Notice that SpellID at the end? 2. Yeah, not sure if you can get around that with the CustomAuraFilter. If you display 10 but have 20 on you and then filter 10 first, the rest (10) won't be displayed. (Hope Haste hasn't changed how it works so I'm speaking out of my nightcap) You can however, if you only want to display dispellable debuffs then use "HARMFUL,RAID" as filter. Or use oUF_RaidDebuffs. |
Quote:
therefore i'd like to know how to sort debuffs by name before filtering. and if this isn't realizable i will use a plugin for that. @Dawn: Try "self.Debuffs.num = 1" in icecrownraid. imo you wont see any debuff all the time on a raidmember. |
Did you take a look at Sorting of auras and Auras sorting ?
|
Quote:
Code:
local sort = function(a, b) |
Where's the name var being set for filter[name] ?
Shouldn't it be Quote:
|
Quote:
Code:
local function sort(a,b) |
Noticed another thing, shouldn't it be PreAuraSetPosition(debuffs, max)
Sorting with only returning true errors out because it means everything should be before everything else. Only returning false gives you some weird sort orders. If you're gonna sort, you have to sort. Basically the sorting function is; Should A (true) be before B (false) and it keeps going until it's looped over the whole table to get the new order. Edit: Can't you use " return a:GetID() < b:GetID() " at the end for the default UnitAura() order? Quote:
|
All times are GMT -6. The time now is 08:00 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI