Quantcast
SetCVar() protected in combat? - WoWInterface
Thread Tools Display Modes
05-24-14, 09:23 PM   #1
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
SetCVar() protected in combat?

update: it appears the answer is "yes", but it is specific CVARs that are protected, not the SetCVar() function.

Blue post http://us.battle.net/wow/en/forum/topic/12674209697

(My initial google search didn't turn this up.)

I will compare/contrast with Blizzard default UI activity (i.e. are Blizzard's keybindings active during combat?), and cogitate on what to do about this. At the very least, the Aloft Auto Show/Hide module will need to lose its combat-related configuration options, and generically delay taking action until the player exits combat.

-----

I am experiencing some weirdness with nameplates in combat.

With the latest WoW patch (5.4.8), Aloft's keybindings to enable hostile and friendly nameplates, wholesale, are not working in combat (they used to), and I am seeing taint-related issues in the error log related to the Blizzard SetCVar() API function (which is what Aloft uses to control this, via setting values on the correct CVAR).

Things seem to work as expected, out of combat.

So, has Blizzard "protected" the SetCVar() function? Can anyone confirm this?

Thanks.
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"

Last edited by acapela : 05-24-14 at 09:32 PM.
  Reply With Quote
05-24-14, 10:37 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
There is already a thread about this here:
http://www.wowinterface.com/forums/s...ad.php?t=49307

This change does not affect your ability to hide/show nameplates based on the player's combat state. As with all other "not allowed in combat" actions, you can still set any or all of these CVars in response to the PLAYER_REGEN_DISABLED (entering combat) and PLAYER_REGEN_ENABLED (leaving combat) events. This is how these events have always worked since the 2.0 patch that added combat restrictions and other UI security measures in the first place. If you've been using some other events to detect the beginning and end of combat for the purpose of altering the UI based on combat, you've been doing it wrong.

It does, however, prevent addons from showing or hiding nameplates while in combat, and you should expect errors to occur if you try to set these newly protected CVars while in combat.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 05-24-14 at 10:39 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » SetCVar() protected in combat?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off