Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-11-11, 04:57 PM   #1
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
Help with displaying boss debuffs on raid frames

I'm trying to get certain debuffs to appear on my raid frames and I'm having some trouble figuring out how to filter them.

Layout code
Code:
	if self.raid then
		if whitelist.RaidDebuffs then
			-- raid debuffs testing----------------------------------------------------
			self.Debuffs = CreateFrame('Frame', nil, self)
			self.Debuffs.spacing = 1
			self.Debuffs.initialAnchor = 'TOPLEFT'
			self.Debuffs['growth-y'] = 'DOWN'
			self.Debuffs['growth-x'] = 'RIGHT'
			-- tiny icons
			self.Debuffs.numDebuffs	= 3
			self.Debuffs.size 		= 8
			self.Debuffs.spacing		= 1

			self.Debuffs:SetWidth(self.sizes.w)
			self.Debuffs:SetHeight(self.sizes.h)

			self.Debuffs:SetPoint('TOPLEFT', self.Health, 0, 0)
			self.Debuffs.CustomFilter	= ok.CustomAuraFilterRaid
		end
Whitelist module
Code:
local whitelist = {
RaidDebuffs = {
[GetSpellInfo(8921)] 	= { color = { 1, 0, 0 }},	--moonfire testing
	},
}
CustomAuraFilter code
Code:
function ok.CustomAuraFilterRaid(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster)
	if caster == 'player' then
		if	type(whitelist[ok.class][name]) == 'table' and
			whitelist[ok.class][name].colour
		then
			icon.colour = whitelist[ok.class][name].colour
			icon.maxc = whitelist[ok.class][name].maxc or nil
			return true
		end
	--end
	else -- added as a test to see if I can get debuff tracking on raid frames
		if	type(whitelist.RaidDebuffs[name]) == 'table' and
			whitelist.RaidDebuffs.colour
		then
			icon.colour = whitelist.RaidDebuffs.colour
			icon.maxc = whitelist.RaidDebuffs.maxc or nil
			return true
		end
	end
end
I'm obviously missing something, because debuffs are not appearing on my raid frames. If I take out the customaurafiltering I can get any debuff to appear on my raid frames.

Any ideas?

EDIT: I'm fairly certain I'm either doing the table wrong or calling the table wrong in the function. Any and all tips would be appreciated.

EDIT #2: I removed all the other sections in the whitelist, it would of been crazy long otherwise.

Last edited by maltese : 10-11-11 at 07:00 PM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Help with displaying boss debuffs on raid frames


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