WoWInterface - View Single Post - Hide party quest information in Raids
View Single Post
10-08-16, 02:00 AM   #13
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Resike View Post
Since you can't set cvars in combat, you should also make sure to have a combat lockdown check.
No. That is completely wrong.

I really wish you would stop posting things without first checking that they are true. This has never been true, and would have taken you less than 30 seconds to test.

/run local v, t, n = "showQuestTrackingTooltips", 1.5, 0 local function f() n = n + 1 SetCVar(v, n % 2 == 0 and 1 or 0) print(n, "-", GetCVar(v)) C_Timer.After(t, f) end C_Timer.After(t, f)
Type that, press Enter, go get in combat. Observe that it keeps counting up every 1.5 seconds, reporting the CVar value as having been successfully changed each time, and no errors are occurring.

To anyone else reading this thread, the code in my previous post in this thread works fine. You do not need to check for combat.

Originally Posted by gmarco View Post
could it be written in this way ?
Yes, but written that way it would toggle the CVar based on whether or not you were in combat, not whether or not you were in a raid. Also, since you still check for raid status, whatever state you were in when you left a raid group -- quest info shown, or not shown -- would "stick" until the next time you entered or left combat after joining another raid group, which probably isn't the intention.
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.

Last edited by Phanx : 10-08-16 at 02:04 AM.
  Reply With Quote