Originally Posted by Resike
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.
Proof:
/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
Hi,
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.