View Single Post
02/25/18, 10:46 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
As the savedvariables is automatically saving the data you can use e.g. the additional "sub key" in the savedvars for the servername.

If you are using non-accountwide settings:
Be sure to switch from ZO_SAvedVars:New to ZO_SavedVarsNewCharacterId too so renames of characters are handled too. The savedvars will be saved with the id of the char and not the name any more!

Lua Code:
  1. local savedVariables = ZO_SavedVars:NewCharacterId("KeyForTheVars", variableVersion, "ServerNameHere", DefaultValues)
  Reply With Quote