View Single Post
09/15/15, 01:04 PM   #1
zgwortz
Join Date: Jun 2015
Posts: 23
Detecting Character Deletion / Rename / Replace

Okay, here's one I haven't seen addressed, and I haven't found anything in the API to deal with this, nor have I found any Addons which seem to address this...

Given you have an add-on which is collecting data about multiple characters (traits known, recipes known, etc.) for cross-character comparisons -- almost everyone is saving that data in account wide saved variables indexed by the character name as obtained by GetUnitName("player").

Except, it occurs to me, if you delete a character, and/or create a new character in the same slot, or if you rename a character (currently not possible, but quite likely down the road), everyone will end up with a kind of ghost of the older character in the saved variables, which can affect tooltips and all kinds of things.

Now, it seems unlikely that we can positively identify a deleted character, but is there any way to get the Character *slot* number of the current character being played? That would at least allow us to catch reused slots, or renamed characters.
  Reply With Quote