View Single Post
11-24-05, 02:26 PM   #10
DSanai
A Wyrmkin Dreamwalker
 
DSanai's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2005
Posts: 50
Actually, it is possible.

Add the ## SavedVariablesPerCharacter line, but give it a NEW variable name.

Change all the references to the old variable to the new name in the LUA/XML.

In the VARIABLES_LOADED event, do this:

if (oldVar[index]) then newVar = oldVar[index]; oldVar[index] = nil; end

[index] would be the Char/Server name set you use to distinguish between character settings in the global SV file.

Now all the old data will be saved to the new variable set, the old settings will move over, and it won't harm the settings for the other characters. Once they've all been logged in, all of the data will be migrated.

It'll still save a nil Account-level SV file, but after some time, you can probably remove that old ## SavedVariables line safely, as your users will have migrated all their commonly played characters.

Hope this helps.
__________________
Dsanai - nElf Hunter
Glacialfox - nElf Death Knight
Evilianti - Gnome Warlock
  Reply With Quote