Thread Tools Display Modes
07-12-10, 04:01 AM   #1
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Hide consolidated buffs.

Hello.

I'm trying to hide the player's buffs (I use oUF player buffs) if they are consolidated by the game. I use a custom script for the consolidate buffs, but currently it doesn't affect oUF's buffs so it's pretty useless right now.

This is my PostUpdateIcon:

Code:
	PostUpdateIcon = function(icons, unit, icon, index, offset, filter, isDebuff)
		local texture = icon.icon
		local name, _, _, _, dtype, duration, expirationTime, unitCaster, shouldConsolidate = UnitAura(unit, index, icon.filter)
		if(unit~="target") then icon:Show() end
		if(UnitIsFriend("player", unit) or playerUnits[icon.owner] or debuffFilter[name] or not icon.debuff or UnitIsPlayer(unit)) then
			icon:Show()
		else
			icon:Hide()
		end
	end
Don't mind the unused stuff in there. I've been trying to add shouldConsolidate in a lot of different ways, but it just doesn't seem to work. Can anyone help me out here? Thanks.

P.S. Sorry for the many topics. I'm learning.
  Reply With Quote
07-12-10, 05:53 AM   #2
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
shouldConsolidate is 1 or nil so a check if shouldConsolidate exist should do the trick.

if shouldConsolidate then
blabla
else
blabla
end.
  Reply With Quote
07-12-10, 05:56 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Well I tried that, it didn't work.
  Reply With Quote
07-13-10, 06:22 AM   #4
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Anyone have an idea? This can't be that hard.
  Reply With Quote
07-13-10, 07:10 AM   #5
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
You should likely be using a CustomFilter rather than PostUpdateIcon. Check oUF\elements\auras for the arguments.
  Reply With Quote
07-13-10, 07:57 AM   #6
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I would try use a custom filter, too. However, chances are that this is not going to work, atm. Due to some little issues with oUF's filter code.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
07-13-10, 08:46 AM   #7
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Well, that's not working me. Thanks for the suggestions, but I think I better wait till those issues are fixed.
  Reply With Quote
07-13-10, 07:20 PM   #8
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
Here's a visual diff of my changes to the aura element. It seems to work with my layout's aura filter, and fixes the bug where all auras after the first hidden one get hidden as well.

http://wowi.pastey.net/138563-aay9:138562-40p2

I haven't exactly thoroughly tested this, but it seems fine after half a night of raiding. Should hold us over until Haste gets back to update oUF.
  Reply With Quote
07-15-10, 05:46 AM   #9
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Saiket View Post
Here's a visual diff of my changes to the aura element. It seems to work with my layout's aura filter, and fixes the bug where all auras after the first hidden one get hidden as well.

http://wowi.pastey.net/138563-aay9:138562-40p2

I haven't exactly thoroughly tested this, but it seems fine after half a night of raiding. Should hold us over until Haste gets back to update oUF.
You can fork oUF over at github and push patches. I can actually merge them from my phone.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-15-10, 05:26 PM   #10
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
Originally Posted by haste View Post
You can fork oUF over at github and push patches. I can actually merge them from my phone.
Done. Hopefully it all worked; that's My First Fork™.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Hide consolidated buffs.


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