oUF DispelColor

I would suggest you to use oUF_DebuffHighlight instead. It has many options that oUF_DC don't have and its a lot better written(more efficient, less cpu usage, etc..).

==========================================================
oUF_DispelColor is a plugin for the unitframes addon "oUF".
It will color the backdrop/border of the frames based on the first debuff color. If no backdrop/border found, then it will create a texture and color that texture instead.

It won't load if the player class is "Hunter", "Rogue", "Warrior" and "Warlock".

*New way to handle things*

Now you don't need to have self.debuffs enabled. This mean you can enable oUF_DC on any frames without actually showing/spawning debuffs, or show all debuffs.

oUF_DC will only react on friendly units and will ignore hostiles ones.

How to enable oUF_DC on a frame?
Just add the variable "self.oufdc = true" to the frame.

Click-Casting
I added click casting(decursing) on frames handled by oUF_DC.
I will uses the correct spells based on your level.
It uses Mouse5 as button and Shift as modifier by default but you can change that easily in the lua. You can change the order of the spells too. Just read the comments carefully.

If you mean that it doesnt color the unitframe of hostile unit based on debuffs color, it's intended to be like that.
Again, you gotta explain to me why you want to color the frame of a hostile unit? since you can't decurse him... im just wondering

or you mean the the debuffs icons don't appear?
If so, you need to understand that debuff.filter is to filter debuffs that you can REMOVE.
Atm, theres no way of showing only debuffs that you can APPLY in oUF. but it should come soon.

My debuff icons aren't showing up on hostile unit frames. That's what I meant, sorry for the confusion.

Originally posted by Coldfury Well ill be changing completly the way oUF_DC works.

You'll need to enable oUF_DC by adding something like "self.oufdc = true".
What this mean is that you won't have to show any debuffs on any frames and oUF_DC will still be working. And if you decide to show debuffs, it won't force the filter to be true so you could enable oUF_DC on the target frame, and show all debuffs, and oUF_DC will only color it if the target is friendly and if it has a removable debuffs.

If you want to enable oUF_DC on raid frames, but don't want to actually see any debuffs, just dont spawn the debuffs and add self.oufdc variable. Like you can have no debuffs shown and still have the frame colored based on removable debuffs.

what do you think?

I think its fantastic. This change will reduce headaches for layout authors who don't want to show buffs or debuffs on certain frames, yet still have decursive colorizations. As a project I've decided to tackle, I'm envisioning a concept of Healbot's decursive appearance/functions plus Grid's appearance and plugin functionalities, minus all the bloat and redundencies... maybe even removing my need for ElkBuffs, too. I'm seeing positive potential with oUF and its plugins to allow this, and I'm borrowing ideas from 4 or 5 different oUF layouts. So I'm pretty excited to read this.

Originally posted by Gaenjin /nod, someone pointed it out in Kosken's UF thread, but I didn't even notice it when I downloaded your update tonight. /lol

I like that functionality, because TBH, I'd prefer only my target frame to be completely unaffected by DC, and be able to just filter my group and raid frames using DC. Which as I understand, Kosken's raidframes (the grid style I'm in love with) doesn't have any debuff display function, but thats a whole other mountain to cross. So far I've just been focusing on the 4 major food groups... player, target, tot and group.

Well ill be changing completly the way oUF_DC works.

You'll need to enable oUF_DC by adding something like "self.oufdc = true".
What this mean is that you won't have to show any debuffs on any frames and oUF_DC will still be working. And if you decide to show debuffs, it won't force the filter to be true so you could enable oUF_DC on the target frame, and show all debuffs, and oUF_DC will only color it if the target is friendly and if it has a removable debuffs.

If you want to enable oUF_DC on raid frames, but don't want to actually see any debuffs, just dont spawn the debuffs and add self.oufdc variable. Like you can have no debuffs shown and still have the frame colored based on removable debuffs.

Originally posted by Coldfury well atm you could always use oUF_DC and just add "self.nodc = true" to the frames you want to be ignored by oUF_DC.

exemple: setting "self.nodc = true" in the target frame modification would make oUF_DC ignore target frame, therefor not forcing the debuffs.filter, but it won't colorize the target frame at all, even if the unit is friendly.

/nod, someone pointed it out in Kosken's UF thread, but I didn't even notice it when I downloaded your update tonight. /lol

I like that functionality, because TBH, I'd prefer only my target frame to be completely unaffected by DC, and be able to just filter my group and raid frames using DC. Which as I understand, Kosken's raidframes (the grid style I'm in love with) doesn't have any debuff display function, but thats a whole other mountain to cross. So far I've just been focusing on the 4 major food groups... player, target, tot and group.

Originally posted by Gaenjin Ah, ok that makes sense, now. I didn't understand the debuffs.filter, I assumed it came from your file, but you've explained it perfectly. I hope that haste gets the fix in soon, I had some plans for using DC in a grid style raidframe layout, but I need to see my debuffs on hostile frames.

well atm you could always use oUF_DC and just add "self.nodc = true" to the frames you want to be ignored by oUF_DC.

exemple: setting "self.nodc = true" in the target frame modification would make oUF_DC ignore target frame, therefor not forcing the debuffs.filter, but it won't colorize the target frame at all, even if the unit is friendly.

Originally posted by Coldfury
If you can't see the debuffs on hostile target its because its only filtering debuffs you can remove. Like i said in the addons description, this addon will force debuffs.filter to be true to work correctly.
The problem here, is from oUF, because debuffs.filter applies no mater if the unit is hostile or friendly, but why filter curable debuffs on hostile target?
I emailed a fix to this to haste(author of oUF) and it should be in the next release of oUF i hope.

This fix will make debuffs.filter to filter curable debuffs on friendly units and show all debuffs on hostile units.

Ah, ok that makes sense, now. I didn't understand the debuffs.filter, I assumed it came from your file, but you've explained it perfectly. I hope that haste gets the fix in soon, I had some plans for using DC in a grid style raidframe layout, but I need to see my debuffs on hostile frames.

Without DC loaded (using just oUF+Layout), I can see debuff icons that I apply on hostile targets just fine. (like Faerie Fire, Mangle, etc)

With DC loaded, I cannot see those debuff icons, they are prevented from being displayed by DC for some reason.

edit:
More specifically, if the routine is being ended if target is Hostile:

Code:

-- check if the frame needs to be colored
local function applyDispelColor(frame)
if(UnitCanAttack("player", frame.unit)) then return end
if(frame) then
local icon = frame.Debuffs[1]
if(icon) then
r,g,b,a = icon.overlay:GetVertexColor()
if(r and icon:IsVisible()) then
applyColor(frame)
else
unapplyColor(frame)
end
else
unapplyColor(frame)
end
end
if(not frame.unit) then unapplyColor(frame) end
end

Then why would it prevent the debuffs from being displayed, since they are displayed just fine when using vanilla oUF without DC? (I hope I'm making sense, cause I need to go get some sleep)

Actually, the code you posted is only to colorize the frame, it doesnt affect at all if debuffs are shown or not. Actually, oUF_DC don't affect if the debuffs are displayed at all, it will affect what debuffs are shown tho.(filter only curable debuffs)

The UnitCanCooperate check it to make sure we dont color blue the target frame if the druid we are attacking has a magic. In other words, why color the frame based on curable debuffs since we can't cure it since its hostile.

If you can't see the debuffs on hostile target its because its only filtering debuffs you can remove. Like i said in the addons description, this addon will force debuffs.filter to be true to work correctly.
The problem here, is from oUF, because debuffs.filter applies no mater if the unit is hostile or friendly, but why filter curable debuffs on hostile target?
I emailed a fix to this to haste(author of oUF) and it should be in the next release of oUF i hope.
This fix will make debuffs.filter to filter curable debuffs on friendly units and show all debuffs on hostile units.

just to clearify, when you are not running oUF_DC, the debuffs.filter isnt set to true, so its showing ALL debuffs(the one you can apply are always moved first in the debuffs order, all other debuffs follow).

No, atm oUF can't filter debuffs by what you can apply but i think its on the to-do list of haste(oUF author), ill speak to him about that. If not, i might try to work something out but if i do, i will prolly be a list of spell that you enter(the debuffs that you want to be "track") based on your class and then check if does debuffs are applied, or.. i dunno.. well see

I'm confused.

Without DC loaded (using just oUF+Layout), I can see debuff icons that I apply on hostile targets just fine. (like Faerie Fire, Mangle, etc)

With DC loaded, I cannot see those debuff icons, they are prevented from being displayed by DC for some reason.

edit:
More specifically, if the routine is being ended if target is Hostile:

Code:

-- check if the frame needs to be colored
local function applyDispelColor(frame)
if(UnitCanAttack("player", frame.unit)) then return end
if(frame) then
local icon = frame.Debuffs[1]
if(icon) then
r,g,b,a = icon.overlay:GetVertexColor()
if(r and icon:IsVisible()) then
applyColor(frame)
else
unapplyColor(frame)
end
else
unapplyColor(frame)
end
end
if(not frame.unit) then unapplyColor(frame) end
end

Then why would it prevent the debuffs from being displayed, since they are displayed just fine when using vanilla oUF without DC? (I hope I'm making sense, cause I need to go get some sleep)

No, atm oUF can't filter debuffs by what you can apply but i think its on the to-do list of haste(oUF author), ill speak to him about that. If not, i might try to work something out but if i do, i will prolly be a list of spell that you enter(the debuffs that you want to be "track") based on your class and then check if does debuffs are applied, or.. i dunno.. well see

Ya, the idea with the list, where you can add the Spells on your own, sounds very nice.

About the Option to make it possible to see what debuffs are on the Hostile Target etc. you think thats possible with just oUF and layout?

Thanks for the comment

No, atm oUF can't filter debuffs by what you can apply but i think its on the to-do list of haste(oUF author), ill speak to him about that. If not, i might try to work something out but if i do, i will prolly be a list of spell that you enter(the debuffs that you want to be "track") based on your class and then check if does debuffs are applied, or.. i dunno.. well see

If you mean that it doesnt color the unitframe of hostile unit based on debuffs color, it's intended to be like that.
Again, you gotta explain to me why you want to color the frame of a hostile unit? since you can't decurse him... im just wondering

or you mean the the debuffs icons don't appear?
If so, you need to understand that debuff.filter is to filter debuffs that you can REMOVE.
Atm, theres no way of showing only debuffs that you can APPLY in oUF. but it should come soon.