View Single Post
05-28-18, 09:10 AM   #7
Cogwerkz
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2017
Posts: 12
Another thing to keep in mind when disabling things using CVars, is that you have to make sure the CVar is changed after the blizzard user settings are fully loaded for your character, or it will likely have no effect.

I usually add a check for VARIABLES_LOADED whenever I change CVars, as this is when the blizzard settings have been loaded.

Originally Posted by Vrul View Post
SetCVar
I'm not sure why setting that CVar before Blizzard_ArenaUI is loaded isn't working though, unless some other code is unparenting ArenaEnemyFrame1-5 from ArenaEnemyFrames.
Probably the above. If we change the CVar when our addon is loaded, there's a chance that the blizzard saved variables are loaded at a later point, thus rendering our CVar change useless as we did it too early in the loading process. The Blizzard_ArenaUI isn't loaded until much later, and the VARIABLES_LOADED event has probably fired long before this, thus the CVar change will have effect.

Last edited by Cogwerkz : 05-28-18 at 09:13 AM.
  Reply With Quote