Securely setting a global variable
I have the following code:
Lua Code:
This works great, however I get the following silly error when I try to rightclick buffs in combat: Code:
Message: Note: AddOn attempted to call a protected function (CancelUnitBuff()) during combat lockdown. I'm not altering these in combat. The values do not change beyond login. Is there a secure way to change these three variables? I am not interested in any buff addons. I just want to change these three global variables once each session. |
Doesn't matter if you change them in combat or not, you've still tainted these globals.
If the stuff you want to move around isn't secure, you should probably hook the functions that control the layout and alter the layout that way. |
I don’t think there’s any functions tied to those variables. They’re directly set and used in BuffFrame.lua. Thanks for your help anyways.
|
Quote:
You could just copy the contents of these functions into your hook and replace the globals used with your own locals. Lua Code:
|
ShinyBuffs edits BUFFS_PER_ROW with no issue. So it may be one of the other two. Have you tried narrowing down which?
|
Quote:
Here's all five mentions of the variable in the entire extract: Code:
..Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua (3 hits) |
Quote:
If you override SECOND_ONELETTER_ABBR, every time any kind of cooldown object gets updated in your UI, a global taint will run by the game, you can guess the overhead that could cause. See related: http://www.wowinterface.com/download....html#comments |
All times are GMT -6. The time now is 03:17 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI