View Single Post
01/26/16, 06:41 AM   #19
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Terrillyn View Post
you mean like
Lua Code:
  1. --pseudo-code
  2. CharSV = newval
  3. if account_wide then
  4.     AWSV = newval
  5. end
when ever a setting is set?
yes. And the get functions always returns the value from CurSV, which is either the same as CharSV or the same as AWSV.
If the user is in account wide mode, the account wide values are used and changed.
If the user switches to char mode, all settings changed while in account wide mode are still the same.

/edit: The only "problem" is:
1. User A made a change while in AW mode
2. User B made a change while in AW mode
3. User A switches to Char mode: the value would change back to User A last change.

Is that what you want, or should User A get a fresh copy of the AW settings? In this case you have to do, what I posted before.

Last edited by votan : 01/26/16 at 06:52 AM.
  Reply With Quote