Thread Tools Display Modes
01-05-13, 06:48 PM   #1
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Desaturate non-Player Debuffs

My code for desaturating debuffs that are not applied by my character is no longer working. All debuffs now show the same. I have attached the code in the hopes that some one can point out my error. Prior to MoP my debuffs would show in full color and all others would be gray scale. I would like to get this behaviour back. Thanks.

Code:
	-- Desaturate non-Player Debuffs
	if(icon.debuff) then
		if(unit == "target") then	
			if (unitCaster == 'player' or unitCaster == 'vehicle') then
				icon.icon:SetDesaturated(false)                 
			elseif(not UnitPlayerControlled(unit)) then -- If Unit is Player Controlled don't desaturate debuffs
				icon:SetBackdropColor(0, 0, 0)
				icon.overlay:SetVertexColor(0.3, 0.3, 0.3)      
				icon.icon:SetDesaturated(true)  
			end
		end
	end
  Reply With Quote
01-06-13, 03:52 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
The variable was renamed to isDebuff a while ago.

f1f7f6331bb835a9c6d63a11fe64f8889924f39d
__________________
「貴方は1人じゃないよ」
  Reply With Quote
01-06-13, 01:35 PM   #3
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Originally Posted by haste View Post
The variable was renamed to isDebuff a while ago.

f1f7f6331bb835a9c6d63a11fe64f8889924f39d
So would it simply be a matter of changing icon.debuff to icon.isDebuff?
  Reply With Quote
01-06-13, 01:39 PM   #4
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Yes.

(10 characters)
__________________
「貴方は1人じゃないよ」
  Reply With Quote
01-06-13, 04:54 PM   #5
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Thank you sir!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Desaturate non-Player Debuffs


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