View Single Post
08/04/14, 05:37 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Flamage View Post
The GetDisplayName() bug is fixed and now we can return to a world of normalcy. Rejoice!

The downside is that your addons will have lost all of their SavedVariables again (unless you were storing these manually or your users were using zgrssd's Display Name Fix addon).

Fortunately, the data isn't lost, and I added a routine in Librarian to migrate the data back to its rightful place.

Modify it to work with your addons as you will:

Code:
if Librarian_SavedVariables["Default"][""] ~= nil then
	Librarian_SavedVariables["Default"][GetDisplayName()] = Librarian_SavedVariables["Default"][""]
	Librarian_SavedVariables["Default"][""] = nil
	SLASH_COMMANDS["/reloadui"]()
end
Note that Librarian_SavedVariables is the name you gave your saved variable parent, for example:
self.localSavedVars = ZO_SavedVars:New("Librarian_SavedVariables", 1, nil, self.defaults, nil)
Good idea. However for users who are using Display Name Fix this could overwrite all their data. It's because savedVariables[""] exists, almost everyone at least once have loaded game without Display Name Fix. I recommend making this code optional - for example as a slash command.
  Reply With Quote