View Single Post
03/31/15, 04:27 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Not that I know of. You could save information about the character along with their name & compare it though. Like save their class & level.

As long as the character is over level 1 (or a different class), when they delete it and create a new toon with the same name the class or level would not match and you would know it was a different toon and then do whatever you need to preserve the old data. Copy it out to an archived table or something before overwriting everything with the new toons information. Or if you cared about level 1 data, you could go a little bit further & check their exact xp amount (and alliance)....check if they have any achievements, probably a bunch of things like that you could check to see if its a newly created toon.

EDIT: Or this might be just what you need:
Lua Code:
  1. GetSecondsPlayed()
Its returning unique values for different toons (and no where near zero when you first log in) so my guess is that this is the total time played for the current character. If you save that with your other data you could compare times played and if the time played is < saved time it must be a new toon.

Last edited by circonian : 03/31/15 at 04:39 PM.
  Reply With Quote