View Single Post
06/28/16, 04:06 AM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
[implemented] Name change notifications for addons

Addons would profit immensly from knowing when their saveData has to be updated because of display name or character name changes.
The best solution I can think of is an EVENT_DISPLAY_NAME_CHANGED(oldDisplayName, newDisplayName) and EVENT_CHARACTER_NAME_CHANGED(oldCharacterName, newCharacterName).
They should be fired right after EVENT_ADDON_LOADED and once they are over, the save data needs to be written to disk.

Please also add an autosave feature that flushes all changed save data to disk every few minutes