Thread Tools Display Modes
10-04-16, 07:17 AM   #1
Maxen
A Fallenroot Satyr
Join Date: Aug 2008
Posts: 23
oUF Phanx - debuffs on target of target

Hey there,

I am trying to add debuff on the target of target frame in oUF Phanx but it does not work so far, not sure why. Here's the code I added in the aura section:

Code:
	elseif unit == "targettarget" then 
		local GAP = 6

		local MAX_ICONS = floor((FRAME_WIDTH + GAP) / (FRAME_HEIGHT + GAP))
		local NUM_BUFFS = 2
		local NUM_DEBUFFS = MAX_ICONS - 2
		local ROW_HEIGHT = (FRAME_HEIGHT * 2) + (GAP * 2)

		self.Debuffs = CreateFrame("Frame", nil, self)
		self.Debuffs:SetHeight(ROW_HEIGHT)
		self.Debuffs.parent = self

		self.Debuffs["growth-y"] = "UP"
		self.Debuffs["showType"] = true
		self.Debuffs["size"] = FRAME_HEIGHT
		self.Debuffs["spacing-x"] = GAP
		self.Debuffs["spacing-y"] = GAP * 2

		self.Debuffs.CustomFilter   = ns.CustomAuraFilters.target
		self.Debuffs.PostCreateIcon = ns.Auras_PostCreateIcon
		self.Debuffs.PostUpdateIcon = ns.Auras_PostUpdateIcon
		self.Debuffs.PostUpdate     = ns.Auras_PostUpdate 
	end
Any ideas? Thanks.
  Reply With Quote
10-06-16, 04:29 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Do you have an error display running? If not, go get one. If there is an error, it probably tells you exactly what and where the problem is; if you need help deciphering it, post the error.

Have you tried adding print statements to see what's happening in realtime? I'd suggest adding one in Auras_PostUpdate (Functions.lua, line 509) as a first step.

Both of those are basic troubleshooting steps you should always try first.

Offhand I'd guess your problem is that your debuffs container frame simply isn't visible, because you don't give it a position (using SetPoint) or a width (using either SetHeight for an explicit width, or multiple SetPoint calls for an implicit width). If you want the debuffs to be in a fixed position, you should copy from the "party" section instead of the "target" section, and just change which CustomFilter it uses. If you want the debuffs to be moved or otherwise reconfigured when you switch specs, you need to copy the entire "target" section, including the "UpdateAurasForRole" function (remove the part of it that concerns buffs) and the "RegisterForRoleChange" method call.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-06-16, 05:04 PM   #3
Maxen
A Fallenroot Satyr
Join Date: Aug 2008
Posts: 23
There was no errors at all but you were spot on for the missing SetPoint!

I may consider using UpdateAurasForRole since this is only needed when tanking...

Again, thanks!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Phanx - debuffs on target of target


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