Thread Tools Display Modes
09-03-10, 01:14 PM   #81
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Did .Debuffs.CustomFilter got fixed already? Or? Because I tried to use it but it's still filtering all the buffs / debuffs instead of only the ones in the whitelist/blacklist.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
09-03-10, 01:18 PM   #82
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by neverg View Post
Did .Debuffs.CustomFilter got fixed already? Or? Because I tried to use it but it's still filtering all the buffs / debuffs instead of only the ones in the whitelist/blacklist.
What oUF version? Could you post some proof of concept? It should be fixed, but you never know with auras. The system exactly something you can throw quickly fixes at anymore :P.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-03-10, 01:41 PM   #83
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Originally Posted by haste View Post
What oUF version? Could you post some proof of concept? It should be fixed, but you never know with auras. The system exactly something you can throw quickly fixes at anymore :P.
I have a Whitelist set and working on some custom buff bars, they work.

I have set some debuffs on the target, they show ok. But If I set a custom filter, no matter what I put in the function, no debuffs will appear, being in the whitelist or not.

Even if I use something like:

Code:
	-- Target Debuff Filter
	function myCustomDebuffsFilter(name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable)
	
		-- if(PlayerClass) then
			-- if(unitCaster == "player" and Whitelist[PlayerClass][name]) then
				-- return false
			-- end 
		-- end
	end
So, it's an empty function, I still see no debuffs.

I'm calling it using:

Code:
self.Debuffs.CustomFilter = myCustomDebuffsFilter
Am I doing something wrong?

PlayerClass is

Code:
local PlayerClass = select(2, UnitClass("player"))
But it doesn't matter for this case everything is commented and it still doesn't work.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
09-03-10, 01:44 PM   #84
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You need to return a true value (true, "'', 1, {}, etc) for it to work. As long as the result yields false/nil -- oUF hides the icon.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-03-10, 01:49 PM   #85
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Originally Posted by haste View Post
You need to return a true value (true, "'', 1, {}, etc) for it to work. As long as the result yields false/nil -- oUF hides the icon.
Ah damn. I thought of using the whitelist as a blacklist that way. Damn, then it's my bad. Thanks again haste. Will have to think of another way.

It just doesn't work.

Using it like this and it doesn't work. Ah damn.

Code:
	-- Target Debuff Filter
	function myCustomDebuffsFilter(name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable)
	
		if(PlayerClass) then
			if(unitCaster == "player" and Whitelist[PlayerClass][name]) then
				return true
			end 
		end
	end
PS - Dawn if you're reading this, can you use debuff / buff filtering on your Layout?


If I put return true in the function it does indeed show debuffs, but decolored, like they weren't mine. Ah well. The function doesn't behave how I thought it would. Well look into it anyway.
__________________
My oUF Layout: oUF Lumen

Last edited by neverg : 09-03-10 at 02:14 PM.
  Reply With Quote
09-03-10, 03:04 PM   #86
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
the aura filter only handles show/hide state, nothing else. You can hack it to actually do some minor changes, but it wasn't really meant for that.

You also don't show how PlayerClass is defined in that code snippet of yours. Having them shown as 'decolored' just tells me that you have some other function not doing its just correctly.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-03-10, 03:09 PM   #87
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Originally Posted by haste View Post
the aura filter only handles show/hide state, nothing else. You can hack it to actually do some minor changes, but it wasn't really meant for that.

You also don't show how PlayerClass is defined in that code snippet of yours. Having them shown as 'decolored' just tells me that you have some other function not doing its just correctly.
I just found it out. I have it desaturing debuffs that are not mine. Problem was when using the customfilter it was desaturing mine too.

You won't believe what it was... I was calling the wrong arguments. :S That's why it didn't work no matter what I had in the customfilter function. lol

I don't know any debugger for Lua like how I use coding c, php or c# so I'm always a bit lost in LUA with values.

But I ran some Ghetto debugging using prints to the default chat frame and found out the problem, it was in the arguments.

Now using:

myCustomDebuffsFilterfunction(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID)

Before: myCustomDebuffsFilter(name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable)

And it was undermining everything! :P

Thanks for the help.

Everything is working now.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
09-03-10, 03:11 PM   #88
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
The arguments were changed in 1.4, guess that's what caught you off-guard .
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-03-10, 03:14 PM   #89
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Originally Posted by neverg View Post
But I ran some Ghetto debugging using prints to the default chat frame and found out the problem, it was in the arguments.
If you think that is Ghetto debugging, then think yourself lucky. Spending time (i.e. over a month) using logic analysers to debug a hardware I/F and driver issue, now that sucks big time. I would have killed to be able to use print statements, but they changed the logic timing
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF 1.4 documentation thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off