Hey guys,
I think I need some advise here...
I'm currently rewriting my oUF-layout to 1.4 and it's nearly done. The last thing ****ing it up are the auras.
I had it set up (pre 1.4) like this:
Every toon has it's own SavedVars file, which contains an array (table) with spellIDs. If there is an aura with a spellID from the table, the aura is shown, if not, it's not displayed (simpe whitelisting).
Now (1.4) the filter stuff is just not working and I can't figure out why. I set up a custom filter in my layout with
self.Buffs.CustomFilter = core.FilterBuffs.
This is the filter-function (basically the start of the filter-process, since I'm generalizing the functions to provide white- and blacklisting.
settings.options.friendsBuffs and
settings.options.friendsDebuffs are the loaded SavedVars-tables described above.
Code:
--[[ Filter buffs
BOOL FilterBuffs(..., INT spellID)
]]
core.FilterBuffs = function(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID)
if ( UnitIsFriend(unit, 'player') ) then
return lib.FilterGeneric(spellID, settings.options.friendsBuffs)
else
return lib.FilterGeneric(spellID, settings.options.enemyBuffs)
end
end
This is the generic filter function which makes the distinction between black- and whitelisting.
Code:
--[[ Generic filter-function (distinction between blacklist and whitelist)
BOOL FilterGeneric(INT spellID, TABLE filterSRC)
]]
lib.FilterGeneric = function(spellID, filterSRC)
if (mode == 'blacklist') then
return lib.FilterBlacklist(spellID, filterSRC)
else
return lib.FilterWhitelist(spellID, filterSRC)
end
end
This is the blacklisting-function. Whitelisting is similar, BOOLs switched, obviously. lib.in_array() is working correctly, too. It's a very slim table lookup.
Code:
lib.FilterBlacklist = function(spellID, list)
if ( #list ~= 0 ) then
if ( lib.in_array(spellID, list) ) then
return false
end
end
return true
end
So, my problem is: Every of this function is working correctly, as far as I can tell from debugging. in oUFs aura.lua my CustomFilter-function is called (in updateIcon() ) and after the functions are processed, it returns true or false.
In updateIcon() everything seems to work correctly, since it jumps to the correct parts, depending on
show. But my buffs/debuffs won't show up.
If I deactivate my CustomFilter, the auras show up in the right placed, obviously without any filtering.
Can someone pls have a look on this... I'm clueless.