The way you can test taint, I believe, is to get in combat and see what happens when you interact or don't interact with the buttons.
I'm not sure if using the SetScale function like that is the best way to go, we used to use Hook functions/scripts for those sorts of things, but then they have changed quite a bit of their lua functionality since I last dabbled with my addons so I'm currently on a new learning curve while upgrading my addons.
|