From 2736cc00650054009911b2a67c45de246111a56a Mon Sep 17 00:00:00 2001 From: Narcasung Date: Mon, 17 Aug 2026 17:20:26 +0200 Subject: [PATCH] Give each character its own settings profile AceDB:New was passed true as defaultProfile, which the library resolves to the literal profile name "Default", so profile selection fell back to a single shared profile for every character instead of to the character key. Changing a setting on one character changed it everywhere. Dropping the argument restores AceDB's per-character fallback. Characters already sitting on the shared profile are moved to their own on next login, with the shared settings copied across so nothing is lost. --- core.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core.lua b/core.lua index 98bc907..ec7250f 100644 --- a/core.lua +++ b/core.lua @@ -39,7 +39,21 @@ CoA:RegisterEvent("ADDON_LOADED", function(_, addon) if addon ~= AddOnName then return end CoA:UnregisterEvent("ADDON_LOADED") - CoA.db = AceDB:New("ElvUI_CoADB", defaults, true) + CoA.db = AceDB:New("ElvUI_CoADB", defaults) + + -- One-time migration: earlier versions pinned every character to a single + -- shared "Default" profile. Move each character to its own name-based + -- profile (copying over the settings it already had) the first time it logs in. + if not CoA.db.char.migratedSharedProfile then + local charProfile = CoA.db.keys.char + + if CoA.db:GetCurrentProfile() == "Default" and charProfile ~= "Default" then + CoA.db:SetProfile(charProfile) + CoA.db:CopyProfile("Default", true) + end + + CoA.db.char.migratedSharedProfile = true + end CoA.db.RegisterCallback(CoA, "OnProfileChanged", "RefreshConfig") CoA.db.RegisterCallback(CoA, "OnProfileCopied", "RefreshConfig")