Moving BuffFrame securely
I use this script to move my BuffFrame closer to the center of the screen.
Code:
hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", function() |
Lua Code:
Fill the anchors however you would like. |
So, that moves the buffframe how you would expect, and works fine with only my addon enabled. However, when using a different addon called EasyFrames, I get an error for a CancelUnitBuff() attempt in combat. Again, this doesn't happen when it's just my addon enabled--I am able to cancel buffs fine. (In fact, I could with the original code posted.)
I've been planning on writing my own unitframe mod anyway so disabling that addon is fine, but my noob question is this: Is that taint caused by my addon, and is EasyFrames is being blamed for it? From what I can tell, it doesn't handle playerbuffs in the buffframe in any capacity. I just want to try and make sure my addon isn't the cause of rogue taint to mess up other things down the line. Here's the error it throws out Code:
9x [ADDON_ACTION_BLOCKED] AddOn 'EasyFrames' tried to call the protected function 'CancelUnitBuff()'. |
I don't really know, but I would say that you should (maybe) know how the taint system works - which, at best, is ... really wierd. You can't say, with any certainty (from what I understand), which addon really caused the taint. And THAT is really frustrating.
I could be totally wrong about this, and if I am, I apologise for putting this here. |
It seems extremely likely that the code posted is what caused the taint. The interesting thing here, though, is that I can run it without error unless I load the other addon. Functionality is restored completely when I remove my code.
I agree with you though, I need to learn more about the taint system. It's really wonky to me. |
Quote:
|
Quote:
|
Taint isn't hard to understand at all. It just means "addon code touched this, so we can't assume execution is safe from here on out". Taint usually spreads by replacing or calling UI functions (implemented in Lua) directly, instead of properly hooking on to functions when they execute instead.
Using widget meta functions (such as SetPoint) doesn't spread taint. E.g: Lua Code:
|
That EasyFrames mod, is a totally non-secure unit frame addon, which spreading taint all over the place.
|
Okay, good to know. Thanks for the replies. The code provided is working excellent.
|
Hello everyone.
Thank you for response about Easy Frames and especially to MunkDev for feedback on the project page. Version 2.5.0 of Easy Frames is released. In this version all tainting code was removed. I think, and I hope that we will never see a "[ADDON_ACTION_BLOCKED] AddOn 'EasyFrames'...." messages in the future. |
Quote:
|
All times are GMT -6. The time now is 03:29 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI