diff --git a/Modules/QuestieInit.lua b/Modules/QuestieInit.lua index 9ab670f..4cb308e 100644 --- a/Modules/QuestieInit.lua +++ b/Modules/QuestieInit.lua @@ -416,7 +416,16 @@ function QuestieInit:LoadDatabase(key) -- This path is for legacy single-file DB format. If we are on a -- modern client (WOW_PROJECT_ID is defined natively and not ancient), refuse -- and direct the user to reinstall the split-file DB instead. - local isModernClient = _G.WOW_PROJECT_ID ~= nil + local _, _, _, tocversion = GetBuildInfo() + local isModernClient = false + if tocversion then + if tocversion >= 100000 then isModernClient = true -- Retail + elseif tocversion >= 11300 and tocversion < 12000 then isModernClient = true -- Classic Era + elseif tocversion >= 20500 and tocversion < 30000 then isModernClient = true -- TBC Classic + elseif tocversion >= 30400 and tocversion < 40000 then isModernClient = true -- WotLK Classic + elseif tocversion >= 40400 and tocversion < 50000 then isModernClient = true -- Cata Classic + end + end if isModernClient then Questie:Debug(Questie.DEBUG_DEVELOP, "[DBDiag] LEGACY DB ('" .. key .. "' is string) on modern client. " diff --git a/Modules/QuestieLearner.lua b/Modules/QuestieLearner.lua index a0de8d8..58e4f9b 100644 --- a/Modules/QuestieLearner.lua +++ b/Modules/QuestieLearner.lua @@ -9,6 +9,8 @@ local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest") local QuestiePlayer = QuestieLoader:ImportModule("QuestiePlayer") ---@type QuestLogCache local QuestLogCache = QuestieLoader:ImportModule("QuestLogCache") +---@type l10n +local l10n = QuestieLoader:ImportModule("l10n") local _Learner = QuestieLearner.private or {} QuestieLearner.private = _Learner @@ -1254,7 +1256,6 @@ function QuestieLearner:OnMouseoverUnit() local zoneText = GetRealZoneText() local areaId = _Learner.zoneCache[zoneText] if not areaId then - local l10n = QuestieLoader:ImportModule("l10n") areaId = l10n:GetAreaIdByLocalName(zoneText) if areaId then _Learner.zoneCache[zoneText] = areaId