Mercurial > wow > libmoduledbshare-1-0
changeset 41:047d80e6aadc
Fixed issue causing data to sometimes not record when logging out.
| author | Andrew Knoll <andrewtknoll@gmail.com> |
|---|---|
| date | Wed, 10 Apr 2013 14:13:06 -0400 |
| parents | e1053178ddbf |
| children | 71f3aad48c72 |
| files | LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua |
| diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua Tue Apr 09 22:15:58 2013 -0400 +++ b/LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua Wed Apr 10 14:13:06 2013 -0400 @@ -149,7 +149,7 @@ group.syncDB.RegisterCallback(group, "OnProfileCopied", "OnProfileCopied"); group.syncDB.RegisterCallback(group, "OnProfileReset", "OnProfileReset"); group.syncDB.RegisterCallback(group, "OnDatabaseShutdown", "OnSyncShutdown"); - initialDB.RegisterCallback(group, "OnDatabaseShutdown", "OnMemberShutdown"); + group.members[initialDB].RegisterCallback(group, "OnDatabaseShutdown", "OnMemberShutdown"); -- register the namespace, not the base db group.squelchCallbacks = false; LibModuleDBShare.groups[groupName] = group; return group; @@ -213,7 +213,7 @@ end -- add to members list self.members[newDB] = namespace; - newDB.RegisterCallback(self, "OnDatabaseShutdown", "OnMemberShutdown"); + namespace.RegisterCallback(self, "OnDatabaseShutdown", "OnMemberShutdown"); -- register the namespace, not the base db end -- LibDualSpec support @@ -408,16 +408,16 @@ if not timestamp then -- ensure uniform timestamps to minimize timestamp = time(); -- calls to SetProfile in NewGroup end - self.members[db].char.logoutTimestamp = timestamp; + db.char.logoutTimestamp = timestamp; -- namespace is registered for callback, not base db if self.usesDualSpec then if not altProfile then altProfile = self.syncDB:GetDualSpecProfile(); dualSpecEnabled = self.syncDB:IsDualSpecEnabled(); activeSpecGroup = GetActiveSpecGroup(); end - self.members[db].char.altProfile = altProfile; - self.members[db].char.dualSpecEnabled = dualSpecEnabled; - self.members[db].char.activeSpecGroup = activeSpecGroup; + db.char.altProfile = altProfile; + db.char.dualSpecEnabled = dualSpecEnabled; + db.char.activeSpecGroup = activeSpecGroup; end end
