Skip to content

Commit 561f698

Browse files
author
mergetest
committed
Add unsupported-version guard popup
v5.0.0 is 12.1-only. If a user force-loads it on an older client (with "Load out of date AddOns" enabled), show an alert telling them to install the build that matches their client from CurseForge or Wago. Uses its own frame so the popup fires even if the main init trips on the wrong client; only triggers on clients older than 12.1.
1 parent 7008874 commit 561f698

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

Core.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,6 +3105,37 @@ end
31053105
-- INITIALIZATION
31063106
-- ============================================================
31073107

3108+
-- ------------------------------------------------------------
3109+
-- Unsupported-version guard
3110+
-- This build is 12.1-only (TOC Interface 120100). WoW hides it as out-of-date
3111+
-- on older clients, but a user with "Load out of date AddOns" enabled would run
3112+
-- it on the wrong version and hit bugs. Warn them to install the matching build.
3113+
-- Uses its OWN frame so the popup fires even if the main init trips on the wrong
3114+
-- client. Only fires for OLDER clients (< 12.1); newer clients are left alone.
3115+
-- ------------------------------------------------------------
3116+
do
3117+
local MIN_INTERFACE = 120100 -- 12.1.0
3118+
local clientToc = select(4, GetBuildInfo())
3119+
if type(clientToc) == "number" and clientToc < MIN_INTERFACE then
3120+
local guardFrame = CreateFrame("Frame")
3121+
guardFrame:RegisterEvent("PLAYER_LOGIN")
3122+
guardFrame:SetScript("OnEvent", function(self)
3123+
self:UnregisterAllEvents()
3124+
local L = DF.L
3125+
if DF.ShowPopupAlert then
3126+
DF:ShowPopupAlert({
3127+
title = L["Unsupported Game Version"],
3128+
message = L["DandersFrames doesn't support this version of the game.\n\nThis build is made for World of Warcraft 12.1. Please install the version that matches your client from CurseForge or Wago."],
3129+
icon = "Interface\\Icons\\INV_Misc_QuestionMark",
3130+
buttons = {
3131+
{ label = L["OK"], onClick = nil },
3132+
},
3133+
})
3134+
end
3135+
end)
3136+
end
3137+
end
3138+
31083139
local eventFrame = CreateFrame("Frame")
31093140
eventFrame:RegisterEvent("ADDON_LOADED")
31103141
eventFrame:RegisterEvent("PLAYER_LOGIN")

Locales/enUS.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,9 @@ L["These settings are being rebuilt on WoW's new 12.1 aura system and will retur
11471147
L["This is being rebuilt on WoW's new 12.1 aura system and will return in a future update."] = true
11481148
L["WoW's new 12.1 aura system doesn't support these settings, so they can't be provided."] = true
11491149
L["WoW's new 12.1 aura system doesn't support this setting."] = true
1150+
-- 12.1 unsupported-version guard popup (Core.lua)
1151+
L["Unsupported Game Version"] = true
1152+
L["DandersFrames doesn't support this version of the game.\n\nThis build is made for World of Warcraft 12.1. Please install the version that matches your client from CurseForge or Wago."] = true
11501153
L["Cmd + Left Click unavailable on Mac"] = true
11511154
L["Font sizes are not changed. Adjust sizes in each element's page."] = true
11521155
L["Note"] = true

0 commit comments

Comments
 (0)