Quantcast WoWInterface - View Single Post - UI Taint w/ SpellFlash
View Single Post
11-04-12, 07:50 PM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
It probably isn't your addon that's causing the taint. That's an action button taint that's been around forever and always gets blamed on the wrong addon. It just happens that it's showing up as a taint in nUI because nUI uses the action buttons.... i.e. something else caused the taint on my addon button, but your addon is taking the blame for it.

This taint bug has been around a very long time and is exceptionally difficult to pin down. I am working with Blizz to try and sort out what the cause is.

That said... it does look to me like you are tainting ActionButton_ShowOverlayGlow() because you are assigning it to a local variable, then assigning the local variable back. That will taint every time. Any time you assign to a Blizz function name or variable, you taint it. If it gets used during combat, it will taint the execution path.

I would suggest using

Code:
local function onOverlayGlow( blah blah blah )
    if procHighlighting then
        DoCustomHighlighting();
    end
end

hooksecurefunc( "ActionButton_ShowOverlayGlow", onOverlayGlow );
That is the secure way to modify Blizz behavior without tainting the execution path. It gets executed after the Blizz logic for the glow and allows you to overload its behavior with your own without adding taint to the execution path.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/