Thread Tools Display Modes
Unread 07-27-12, 10:09 AM   #1
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 764
Taint in MoP, buffs, dropdown and nameplates

I got some questions for you, first of all, buffs are easy to taint, just changing buff border with a script is enough to make you unable to right-click buffs since canceling is now protected. The issue now is that if you wish to change the buffs layout, even JUST the time format on the auras, you need to make a whole addon and write a ton of code as anything will break the ability to cancel buffs. Are there plans to change this or will we have to use the SecureAuraHeaderTemplate and write a hundred lines just to modify the time format? :P
Just an additional question regarding auras, the template is very limited so things like "hiding" specific auras doesn't seem possible, or is it? Last time I tried, a year ago, I could specify some attributes but not do anything in addition in order to alter specific buff buttons, not without causing taint.

About dropdown menus, for example the world markers, the dropdown menu don't work after a while since the dropdown menu is recycled and it gets tainted when addons use it too, so it stops working. Did they do something to fix this issue?

Last question is about nameplates, they are not in lua so altering them is a lot of work, any info if they plan to make it any easier in MoP or do we have to make a lot of code constantly run in the background in order to skin those frames?
Also a side question regarding nameplates, cast bars only appear on your target -any plans to make it so cast bars appear on all nameplates and not just the target? Things like target tracking, it would be nice if they could introduce a new unit type for nameplates, so it's easier to create accurate nameplates with auras and such without eating CPU to estimate and assume, like we currently have to.

I have no access to US forums, like always, so can't post any requests to the devs, so I've kind of not paid attention to any posts they've made. Thus, I hope someone can shed some light on these questions of mine, you are bound to know more about the situation than me. :P

Last edited by Vlad : 07-27-12 at 10:16 AM.
Vlad is offline  
Unread 07-27-12, 11:41 AM   #2
Lombra
A Cobalt Mageweaver
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 233
I use the following to modify the time format and have not had any problems as far as I remember.
Code:
local function lSetTimeText(button, timeLeft)
	local d, h, m, s = ChatFrame_TimeBreakDown(timeLeft)
	if timeLeft <= 0 then
		button:SetText("")
	elseif timeLeft < 3600 then
		button:SetFormattedText("%02d:%02d", m, s)
	end
end

hooksecurefunc("AuraButton_UpdateDuration", function(auraButton, timeLeft)
	if SHOW_BUFF_DURATIONS == "1" and timeLeft then
		local duration = auraButton.duration
		lSetTimeText(duration, timeLeft)
	end
end)
But I realise that that wasn't necessarily your point.
__________________
Grab your sword and fight the Horde!
Lombra is online now  
Unread 07-27-12, 11:58 AM   #3
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 80
I don't think much has changed with SecureAuraHeader. The weapon enchant bugs from 4.3 are still definitely present and it still feels like a highly neglected piece of code. Bug lists for it, including line-by-line explanations and fixes, were posted in the forums for something like a year before some of them were implemented in an update that introduced a number of new bugs, including the creation of multiple duplicate "ghost frames" on any class that uses weapon enchants. How long it might be before those bugs are fixed I wouldn't dare to venture a guess.

As for filtering, there is a rudimentary "consolidate" system which basically uses the shouldConsolidate return value from UnitAura along with some duration thresholds to move the buff/debuff to a proxy header. It may be possible to hack UnitAura's return values to use this as a way to do blacklisting/whitelisting, but it always seemed like a pretty ugly solution and I'm unsure if it would actually work without causing taint. You can supply the header with a couple of parameters to tell it how to sort the auras, but it's basically just "by time" or "reverse" or what have you. There is no fine-grained control.

Since my understanding of the original purpose of moving auras to a secure system was to stop druids from auto-canceling forms, I'm unsure if the system is really that necessary any more. But since Blizzard doesn't actually have to use their own code and deal with all the problems it has, there's not much incentive for them to scrap the system and come up with a better solution, either. And so it languishes.
Barjack is offline  
Unread 07-27-12, 01:07 PM   #4
Talyrius
A Rage Talon Dragon Guard
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 300
@Vladinator
Patch 4.3 added the ability to place and clear world markers through macro commands. These do not cause taint.

@Barjack
The problem in the SecureAuraHeader regarding assigning the incorrect inventory slot ID to temporary weapon enchants was definitely fixed in patch 4.3. I haven't checked to see if the aura ghosting has been fixed on the beta yet.

Last edited by Talyrius : 07-27-12 at 01:15 PM.
Talyrius is offline  
Unread 07-27-12, 06:10 PM   #5
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 80
Originally Posted by Talyrius View Post
@Barjack
The problem in the SecureAuraHeader regarding assigning the incorrect inventory slot ID to temporary weapon enchants was definitely fixed in patch 4.3. I haven't checked to see if the aura ghosting has been fixed on the beta yet.
I know the slot ID bug was fixed, that was during the "big fix" that took about a year to arrive. Honestly that wasn't even that bad since you could fix the slot IDs yourself out of combat. The aura ghosting still definitely exists in beta, at least as of last patch (and seeing as the secure header file hasn't been updated in 4 months according to some github mirrors, I assume the current patch too). The aura ghosting is even harder to work around since you simply cannot remove the clickable frame, all you can do is change its alpha if you detect via some heuristics that it's a ghost.

At least the bug where the frame isn't updated upon a ranged weapon enchant being detected (as opposed to the previous bug where they weren't supported at all) is made obsolete by the removal of that weapon slot.
Barjack is offline  
Unread 07-28-12, 07:54 AM   #6
Foxlit
A Warpwood Thunder Caller
 
Foxlit's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 91
Originally Posted by Vladinator View Post
About dropdown menus, for example the world markers, the dropdown menu don't work after a while since the dropdown menu is recycled and it gets tainted when addons use it too, so it stops working. Did they do something to fix this issue?
4.3.0 made dropdown menus harder to taint. If you've got a non-trivial example of things going wrong (i.e. not "Focus unit" being tainted for custom unit frames), you should post it somewhere.

[On a sidenote, the presented analysis as to the cause of world markers taint is wrong -- addons using UIDropDownMenu were not the problem; rather, the issue was caused by addons that tainted execution paths on which FrameXML used UIDropDownMenu halfway through the interaction with that API, mostly by tainting used globals.]


[...] buffs are easy to taint, just changing buff border with a script is enough to make you unable to right-click buffs since canceling is now protected. The issue now is that if you wish to change the buffs layout, even JUST the time format on the auras, you need to make a whole addon and write a ton of code as anything will break the ability to cancel buffs. Are there plans to change this or will we have to use the SecureAuraHeaderTemplate and write a hundred lines just to modify the time format?
I think the larger issue is that some people do not have an accurate model of how taint works, and so are constantly surprised that the code they wrote interacts badly with it. There are clearly solutions to your "modify the time format" problem that do not involve writing a hundred lines of code and do not cause issues with taint.

It's also my impression that CancelUnitBuff is only protected in combat (though fails silently if called insecurely for shapeshift buffs). Are there any situations when you'd want to cancel buffs in combat?
__________________
... and you do get used to it, after a while.
Foxlit is offline  
Unread 07-28-12, 08:57 AM   #7
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 764
So far it's been very informative, thanks.

About the buff example it seems I was wrong here, testing now it works fine to modify the timer. Last time I worked on this was long ago in Cataclysm, either things changed or other addons were doing something to cause taint that broke my old buff timer, in any case at least it got cleared up.

I may not be the best to formulate myself, just don't needlessly annoyed by me. It's true that I still don't know enough about taint, trying to learn now. :P
Vlad is offline  
 

Go BackWoWInterface » WoD Beta » MoP archived threads » Taint in MoP, buffs, dropdown and nameplates

Thread Tools
Display Modes

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