Set PowerBarColor without taint?
Is it possible to set PowerBarColor["MANA"] without taint?
I'm currently using. Code:
_G.PowerBarColor["MANA"] = {r = 0/255, g = 0.55, b = 1} |
Does things still break if you do this?
Code:
local t = _G.PowerBarColor["MANA"] http://wow.gamepedia.com/Secure_Execution_and_Tainting |
Taint in and of itself is fine, and is going to happen. It just means that non-Blizzard code touched something in Blizzard code. When to worry about it is when it causes an action blocked error, which means that Blizzard's secure code was tainted (either directly or through a chain reaction).
|
The color of mana isn't a big issues but it would be nice to get it working. I'm getting this lua error with my code and the code that was suggested by Vlad.
Code:
1x [ADDON_ACTION_BLOCKED] AddOn '!Colorz' tried to call the protected function 'CompactRaidFrame28:Show()'. The funny party is the addon overwrites entire functions and it doesn't care at all but add that one line to change a variable and it has a problem. I'm working on !Colorz if you want to see the full code. |
You will most likely have to use secure hooks. For an example, here is the function I use in !ClassColors to apply custom class colors to the health bars of the default raid frames:
lua Code:
You'll need to change the function, object, and table names, but otherwise it should be pretty similar. You can't modify the original table at all, so you'll need to add a bunch more hooks to apply your custom colors to power bars in other parts of the UI as well. |
Hooking UnitFrameManaBar_UpdateType would work for the default unit frames but I had to go into the oUF layouts and manually check for mana to fix them.
|
Quote:
|
Quote:
|
Quote:
Lua Code:
|
Depending on the layout, there may not be an "ns.oUF", but instead a global "oUF". To account for both possibilities (without changing anything else in the layout) that second line should be:
Code:
local oUF = ns.oUF or oUF https://github.com/Phanx/oUF_Phanx/b.../Core.lua#L220 |
Quote:
|
All times are GMT -6. The time now is 06:52 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI