Quantcast WoWInterface - View Single Post - Help with simple addon - enforcing cvars
View Single Post
01-11-18, 01:11 PM   #13
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,052
Originally Posted by Ammako View Post
It sounded to me like they wanted to ensure it would override settings set by any addons. Though I guess my point is moot because OP is using AIO, but other people finding this thread from Google might not be.
If this is the case then loading later in the loading process won't be enough to really solve this problem.

Since any addon can change any cvar at any point while the game is running, to actually prevent a cvar from being changed requires actively monitoring for any future cvar changes and reversing them (which could cause an infinite loop if someone else has the same idea that their settings are actually more important than your settings and tries to reinforce them too), and would prevent you from doing things like toggling nameplate visibility on the fly (although I believe those are combat-protected so you'd have to take that into account as well).

To anyone finding this thread later: Don't automatically change cvars in your addon unless you have a very good reason to do so, and make it clear to your users that this is something you're doing.

These settings are generally permanent, and many of them can't be set through the interface, so even if your addon is disabled its changes will remain in-place and not easily reverted.
  Reply With Quote