View Single Post
07/26/18, 05:02 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
If you need example code look at FCO Craft Filter, file FCOCraftFilter.lua.
Search for "-- LOAD USER SETTINGS".
Below you'll find the account wide settings loaded first:
FCOCF.settingsVars.defaultSettings = ZO_SavedVars:NewAccountWide(addonVars.addonSavedVariablesName, 999, "SettingsForAll", defaultsSettings, nil)


"SettingsForAll" is the section where the savedvars will be saved in your file.

The last parameter "nil" above is he table key which is ["default"[ in the savedvars file if left nil.
You are able to use this for the ESO Server e.g. if you want to have different settings per each eso server (NA, EU, PTS).
GetWorldName() gives you the servername.


After this the read account wide settings are used to determine if the user chose to use accountWide settings or settings for each char (saveMode).

Just as an example.
  Reply With Quote