diff --git a/EventManager.lua b/EventManager.lua index a39c321..30e557c 100644 --- a/EventManager.lua +++ b/EventManager.lua @@ -223,8 +223,9 @@ STOP_AUTOREPEAT_SPELL --]] function Full:InitialOnEvent(Event, Arg1) - if (Event == "ADDON_LOADED" and Arg1 == "ButtonForge") then - self.AddonLoaded = true; --Before setting up is complete we also need to have companion, spell, and macro data available + + if (Event == "ADDON_LOADED" and Arg1 == "ButtonForge-classic") then + self.AddonLoaded = true; --Before setting up is complete we also need to have spell, and macro data available elseif (Event == "PLAYER_ENTERING_WORLD") then Util.CacheCompanions(); @@ -239,7 +240,7 @@ function Full:InitialOnEvent(Event, Arg1) self.MacrosLoaded = true; end - if (Util.CompanionsCached and self.AddonLoaded and self.MacrosLoaded and self.SpellsCached) then + if (self.AddonLoaded and self.MacrosLoaded and self.SpellsCached) then self:SetScript("OnEvent", nil); --Swap to our standard event processor if (LibStub) then Util.LBF = LibStub("Masque", true); diff --git a/Util.lua b/Util.lua index 9803068..55a2c00 100644 --- a/Util.lua +++ b/Util.lua @@ -105,7 +105,7 @@ function Util.UpdateSavedData() ------The following section updates the per character saved data------ --Need to allocate save structure - if (not ButtonForgeSave) then + if (not ButtonForgeSave or ButtonForgeSave["Version"] == nil ) then --Swap v0.9.0 / v0.9.1 / v0.9.2 users to the new save structure ButtonForgeSave = {}; ButtonForgeSave["ConfigureMode"] = true; @@ -249,7 +249,7 @@ function Util.UpdateSavedData() -----This section updates the global button forge data (introduced at 0.9.16) - if (not ButtonForgeGlobalSettings) or (ButtonForgeGlobalSettings == nil) then + if (not ButtonForgeGlobalSettings) or (ButtonForgeGlobalSettings == nil) or (ButtonForgeGlobalSettings["Version"] == nil) then ButtonForgeGlobalSettings = {}; ButtonForgeGlobalSettings["Version"] = 0.9; ButtonForgeGlobalSettings["VersionMinor"] = 16; @@ -1849,7 +1849,6 @@ function Util.CacheCompanions() -- end -- Util.Mounts[spellID] = mountID; -- end - Util.CompanionsCached = true; end function Util.LookupCompanion(Name)