Download
(4Kb)
Download
Updated: 10-18-10 01:00 PM
Addon for:
oUF.
Pictures
File Info
Updated:10-18-10 01:00 PM
Created:unknown
Downloads:29,867
Favorites:157
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
Post A Reply Comment Options
Unread 04-29-08, 08:30 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 22
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
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: 10
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.
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: 22
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
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: 8
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.
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: 22
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
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: 8
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.
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: 1
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?
Report comment to moderator  
Reply With Quote
Unread 08-10-08, 12:03 PM  
dutorien
A Murloc Raider

Forum posts: 5
File comments: 13
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
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: 22
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
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
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: 22
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.
Report comment to moderator  
Reply With Quote
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: 212
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.
Report comment to moderator  
Reply With Quote
Unread 08-18-08, 02:19 AM  
Ammo
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 137
Uploads: 22
Could this be an issue with your texture?

The code looks fine, try using a different highlight texture.

-Ammo
Report comment to moderator  
Reply With Quote
Unread 09-13-08, 03:21 AM  
ichik
A Murloc Raider
 
ichik's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 263
Uploads: 5
I have only one question (since i'm not very experienced with lua-coding) how to disable highlight for unstable affliction?
Report comment to moderator  
Reply With Quote
Unread 09-26-08, 08:08 PM  
Atrophia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 17
Uploads: 4
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.
At the moment the BackdropBorderColor is not being changed. Shouldn't the below function read like this?

Code:
local function PostUpdateAura(object, event, unit)
	local debuffType, texture  = GetDebuffType(unit, object.DebuffHighlightFilter)
	if debuffType then
		local color = DebuffTypeColor[debuffType] 
		if object.DebuffHighlightBackdrop then
			object:SetBackdropColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or 1)
			object:SetBackdropBorderColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or 1)
		elseif object.DebuffHighlightUseTexture then
			object.DebuffHighlight:SetTexture(texture)
		else
			object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or .5)
		end
	else
		if object.DebuffHighlightBackdrop then
			local color = origColors[object]
			object:SetBackdropColor(color.r, color.g, color.b, color.a)
			color = origBorderColors[object]
			object:SetBackdropBorderColor(color.r, color.g, color.b, color.a)
		elseif object.DebuffHighlightUseTexture then
			object.DebuffHighlight:SetTexture(nil)
		else
			local color = origColors[object]
			object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, color.a)
		end
	end
end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: