Originally Posted by LanceDH
Bit off topic, but am I wrong in saying CVAR_UPDATE also doesn't trigger as it should?
It's used in many of Blizzard's lua files, but it doesn't show up in the eventtrace and doesn't seem to trigger in add-ons.
|
It does trigger but only if the 3rd parameter of the SetCVar function is set.
EG.
Changing the Display Honor as Experience Bar doesn't trigger the CVAR_UPDATE because in their code they haven't done something along the lines of SetCVarBool("HonorAsExperience",true,"HONOR_AS_EXPERIENCE"). That third parameter would be what you test for on the CVAR_UPDATE event.
However, if you adjust the option setting to always display action bars ( this will show the outline of the buttons without icons in ), it will trigger the CVAR_UPDATE with the argument "ALWAYS_SHOW_MULTIBARS_TEXT" which is the 3rd value when they set their CVAR with SetCVarBool("alwaysShowActionBars",true,"ALWAYS_SHOW_MULTIBARS_TEXT")