Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(4 Kb)
Download
Updated: 10-18-10 01:00 PM
Addon for:
oUF.
Pictures
File Info
Updated:10-18-10 01:00 PM
Created:unknown
Downloads:27,362
Favorites:163
MD5:

oUF Debuff Highlight  Popular! (More than 5000 hits)

Version: r50-release
by: Ammo [More]

This is an addon that adds Debuff Highlighting to the oUF unitframes.

Whenever a unit has a debuff it will highlight the frame in the debuff color. This can be done either on
the unitframe background or a specially created frame for the task.

To use this in your oUF layout you will need one of the following:

Code:
self.DebuffHighlightBackdrop = true
This will let oUF_DebuffHighlight know to use the backdrop for debuff highlighting. The original color and alpha
of the backdrop and backdrop border will be stored and whenever the unit needs highlighting it will color the
backdrop and backdrop border in corresponding color and set the alpha. When the debuff is gone the original
color and alpha will be restored.

The other option to add Debuff Highlighting is to provide a texture (or other UI type that supports :SetVertexcolor)
on your unit frame.

Code:
local dbh = self:CreateTexture(nil, "OVERLAY")
dbh:SetAllPoints(self)
dbh:SetTexture("SomeKindOfTexturepath")
dbh:SetBlendMode("ADD")
dbh:SetVertexColor(0,0,0,0) -- set alpha to 0 to hide the texture
self.DebuffHighlight = dbh
Be warned, your healthbar is probably the best place to create a full glow texture:
Code:
local dbh = hp:CreateTexture(nil, "OVERLAY")
Because all your unit UI elements will be covering your unitframe (self) most likely.

This frame will now be used with :SetVertexColor() to highlight debuffs.

You can control the alpha of the debuff highlight on backdrop or debuffhighlight frame by setting:

Code:
self.DebuffHighlightAlpha = .5
The default value is .5 for the highlight frame and 1 for the backdrop.

If you only want to highlight debuffs that you can cure:

Code:
self.DebuffHighlightFilter = true
This is off by default.

If you want to use the actual texture of the debuff to show instead of coloring the frame do the following:

Create the self.DebuffHighlight texture and positionit, make sure it's visible (alpha not set to 0):

Code:
local dbh = hp:CreateTexture(nil, "OVERLAY")
dbh:SetWidth(32)
dbh:SetHeight(32)
dbh:SetPoint("CENTER", self, "CENTER")
self.DebuffHighlight = dbh
And set:

Code:
self.DebuffHighlightUseTexture = true

Enjoy

-Ammo

r50-release
- fix proper debuff color per class thanks elv22

r48-release
- 4.0 toc
- add option to only color backdropborder or backdrop or backdrop&border

r44-release
- 3.1 compatible release

r41-release
- fixes for nil errors now uses AddElement

r36-release
- Wotlk update

r79326
- Update for latest oUF

r72358
- Fixes issue with not highlighting a debuff if all previous debuffs had no type.

r72075
- Fix debuffhighlight not working for units that don't have buffs/debuff display enabled
- Add support for using the debuff icon texture instead of coloring a frame

r72066
- Only highlight units that the player can interact with for curing

r72056
- Initial upload to wowinterface
Archived Files (4)
File Name
Version
Size
Author
Date
r48-release
3kB
Ammo
10-16-10 08:06 AM
r44-release
3kB
Ammo
04-30-09 05:12 AM
r41-release
4kB
Ammo
01-06-09 07:00 AM
r36-release
4kB
Ammo
12-23-08 05:48 AM


Post A Reply Comment Options
Unread 08-17-08, 10:56 AM  
Flarin
A Frostmaul Preserver
 
Flarin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 151
Uploads: 1
Hello- I am having trouble diagnosing my issues and I am hoping you can point me in the right direction.

In my main styling function I am using:

Code:
    -- oUF_DebuffHighlight
        local dbh = hp:CreateTexture(nil, "OVERLAY")
        dbh:SetAllPoints(hp)
        dbh:SetTexture("Interface\\AddOns\\oUF_FlarinV2\\media\\highlight.tga")
        dbh:SetBlendMode("ADD")
        dbh:SetVertexColor(0, 0, 0, 0)
        self.DebuffHighlightAlpha = 1
        self.DebuffHighlightFilter = false
        self.DebuffHighlight = dbh
For some reason I get no indication of debuff (trying to force things to poison you is such a pain).

However, when I use:

Code:
        local dbh = hp:CreateTexture(nil, "OVERLAY") -- support of oUF_DebuffHighlight, which i highly recommend
        dbh:SetWidth(22)
        dbh:SetHeight(22)
        dbh:SetPoint("CENTER", self, "CENTER")
        dbh:SetBlendMode("BLEND")
        self.DebuffHighlightUseTexture = true
        self.DebuffHighlightFilter = true
        self.DebuffHighlight = dbh
I DO get the icon on top of my frame. I realize this is probably because my lack of understanding of exactly how the frames work, but i am hoping you can shed some light for me.

EDIT: Leaving my original question just in case it helps someone else. I noticed with the code below that once I changed the vertex color from 0,0,0 to some other value I started to see my texture come through. Also the "BLEND" mode worked out pretty cool for me - makes the debuff very visable on my frames.

I was wondering - perhaps Ammo or some other Lua master can tell me what their thoughts are on why changing the SetVertexColor from 0,0,0 to antoher value did the trick? It looks like oUF_Debuff changes this value to the color of the debuff - ie green for poison etc, yet at 0,0,0 it seemed to fail?

Anyway - here is a working routine:

Code:
        local dbh = hp:CreateTexture(nil, "OVERLAY")
        dbh:SetAllPoints(hp)
        dbh:SetTexture("Interface\\AddOns\\oUF_FlarinV2\\media\\highlight.tga")
        dbh:SetBlendMode("BLEND")
        dbh:SetVertexColor(.85, 0, 1, 0)
        self.DebuffHighlightAlpha = 1
        self.DebuffHighlightFilter = false
        self.DebuffHighlight = dbh
__________________

"I will crush and destroy and...ooo...shiny..."

[SIGPIC][/SIGPIC]
Last edited by Flarin : 08-17-08 at 12:50 PM.
Flarin is offline Report comment to moderator  
Reply With Quote
Unread 08-17-08, 07:09 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
Originally posted by shadowknight456
Heya, just wondering if it would be possible to get this to only shade the border of my frame (kind of like PitBull) Thanks in advance =D
read the included readme.txt for your answer.
Ammo is offline Report comment to moderator  
Reply With Quote
Unread 08-15-08, 10:47 PM  
shadowknight456
A Defias Bandit

Forum posts: 2
File comments: 7
Uploads: 0
Heya, just wondering if it would be possible to get this to only shade the border of my frame (kind of like PitBull) Thanks in advance =D
shadowknight456 is offline Report comment to moderator  
Reply With Quote
Unread 08-11-08, 06:42 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
I see no reason to?

Unless you can come up with one, no.

-Ammo

Originally posted by dutorien
could you please add this :

Code:
if debufftype == nil then debufftype = "none" end
to line 22 to support the debuff type "none"

Best regards !

Duto
Ammo is offline Report comment to moderator  
Reply With Quote
Unread 08-10-08, 12:03 PM  
dutorien
A Murloc Raider

Forum posts: 5
File comments: 11
Uploads: 0
could you please add this :

Code:
if debufftype == nil then debufftype = "none" end
to line 22 to support the debuff type "none"

Best regards !

Duto
dutorien is offline Report comment to moderator  
Reply With Quote
Unread 08-10-08, 12:37 AM  
khangg
An Aku'mai Servant
AddOn Compiler - Click to view compilations

Forum posts: 35
File comments: 53
Uploads: 2
I'm not very good with oUF, so this may sound stupid :S

I noticed in the picture that you had a border around your unitframe, I'm currently using Flarin's oUF layout, how do I achieve this border?
khangg is offline Report comment to moderator  
Reply With Quote
Unread 05-01-08, 06:13 PM  
villiv
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 73
Uploads: 9
thx for reply, Ammo.

ok maybe i'm old school people ... still in the "Decursive vs Blizz" fashion. but for arena ... i'll be looking for the another way i think.

anyway, thx again for your effort. i really enjoy these functions in your layout too. plz keep good work.


regards.
villiv is offline Report comment to moderator  
Reply With Quote
Unread 05-01-08, 05:57 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
Originally posted by villiv
hello Ammo.

is there a way to set the filter to backdrop and actual texture separately?

i'd like to see all debuffs on my party/raid as a actual texture to check, and just want to see some more noticeable signals for my cure work.

let me know if i don't make any sense ... i'm so bad at english anyway.


regards.
Not possible, and probably never will be either.

-Ammo
Ammo is offline Report comment to moderator  
Reply With Quote
Unread 04-30-08, 06:29 PM  
villiv
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 73
Uploads: 9
hello Ammo.

is there a way to set the filter to backdrop and actual texture separately?

i'd like to see all debuffs on my party/raid as a actual texture to check, and just want to see some more noticeable signals for my cure work.

let me know if i don't make any sense ... i'm so bad at english anyway.


regards.
villiv is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 09:57 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
Originally posted by Neal
Like Grid? Yeah!^^

Will it possible to use there a own Border? Blizzlike buffborder sucks
With some tricksyness yes

You could make self.DebuffHighlight not a real frame but a dummy table with a SetTexture function that handles setting the correct texture on the real debuff frame and showing the border. Hide everythign again when nil gets passed to your SetTexture function.

-Ammo
Ammo is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 09:12 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 15
Originally posted by Ammo
I added support for using the actual debuff icon texture instead of coloring a texture as well. I will update on wowinterface later today.

-Ammo
Like Grid? Yeah!^^

Will it possible to use there a own Border? Blizzlike buffborder sucks
Last edited by Neal : 04-29-08 at 09:14 AM.
Neal is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 08:30 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
Originally posted by Neal
The new version on the wowace svn works great! Tanks!
I added support for using the actual debuff icon texture instead of coloring a texture as well. I will update on wowinterface later today.

-Ammo
Ammo is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 08:06 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 15
The new version on the wowace svn works great! Tanks!
Neal is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 07:46 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 15
Originally posted by Ammo


You don't use buffs or debuffs on that frame right?

-Ammo
yes
Neal is offline Report comment to moderator  
Reply With Quote
Unread 04-29-08, 07:41 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 26
Originally posted by Neal
Yes i get a red texture
it was a bug in oUF_DebuffHighlight I think.

You don't use buffs or debuffs on that frame right?

I have fixed it. And will upload a new version shortly.

-Ammo
Ammo is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: