From 700445c248beef284e8eb99a39a9e36f488e50c6 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Mon, 8 Jun 2026 16:24:46 -0500 Subject: [PATCH] fix(options): use {} not { ... } for tab tables Five Options files seeded their tab tables with { ... } instead of {}. At chunk scope WoW passes ... = (addonName, addonTable), so each table got two stray junk entries instead of being empty; { ... } is also a strict Lua 5.0 parse error. Fixed QuestieOptions.tabs and the Arrow, General, Keybinds, and Tracker tab tables. Cherry-picked from phase2-lua50-sweep (the only version-independent fix in that branch). --- CHANGELOG.md | 1 + Modules/Options/ArrowTab/QuestieOptionsArrow.lua | 2 +- Modules/Options/GeneralTab/QuestieOptionsGeneral.lua | 2 +- Modules/Options/KeybindsTab/QuestieOptionsKeybinds.lua | 2 +- Modules/Options/QuestieOptions.lua | 2 +- Modules/Options/TrackerTab/QuestieOptionsTracker.lua | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b71eb21..1c667df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - **[Tooltip - Item Starts Quest]** Item tooltips now surface a "Drops a quest !" line with the quest title when the item has a non-zero `startQuest` value in the static DB / Ascension override table and the player does not already have the quest (active or turned in). The item→quest relationship is a build-time DB field — we never know it ahead of runtime observation — so it is read directly from `QueryItemSingle` at hover time. The line uses `QuestieLib:GetColoredQuestName` so the quest title respects the same level/complete state formatting the rest of Questie uses. - **[QuestieDB - Auto Mode Learner Enrichment]** In `auto` data-source mode, `QuestieDB.GetQuest` now overlays the SavedVariables learner payload on top of the static DB record, filling only fields the static record leaves `nil` and deep-merging `objectives`/`objIndex`. This fixes quests like 8325 where the shipped DB carries only a stub record but QuestieLearner holds the real objective mapping — previously the stub blocked the learned objectives from ever surfacing. Learner data never clobbers a present static value, so it strictly enriches and cannot regress shipped data. - **[QuestieLearner - Accept-Time Objective Pin Seeding]** `OnQuestAccepted` now seeds objective pins directly from the SavedVariables learner payload (`objIndex`) the moment a quest is accepted in learner mode, instead of waiting for quest-log text sync. This makes quests like 8325 spawn pins immediately on accept when the objective mapping already exists. The accept-time ID lookup was also widened from `killcredit` to also cover `monster` objectives, and now falls back to `objData.Id` when no `IdList` is present, catching cases where the quest-log text does not normalize cleanly to the NPC name. +- **[Options - Tab Table Vararg Typo]** Five Options files initialized their tab tables with `{ ... }` instead of `{}` (`QuestieOptions.tabs` plus the Arrow, General, Keybinds, and Tracker tabs). At chunk scope WoW passes `...` = `(addonName, addonTable)`, so each table was seeded with two stray junk entries (`[1]="Questie"`, `[2]=`) instead of being empty, and the `{ ... }` expression is also a hard parse error under strict Lua 5.0. Changed all five to `{}`. ### Tooltip diff --git a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua index 6c9d8d2..e904b89 100644 --- a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua +++ b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua @@ -61,7 +61,7 @@ local function GetExpandedFontList() return fonts end -QuestieOptions.tabs.arrow = { ... } +QuestieOptions.tabs.arrow = {} function QuestieOptions.tabs.arrow:Initialize() return { diff --git a/Modules/Options/GeneralTab/QuestieOptionsGeneral.lua b/Modules/Options/GeneralTab/QuestieOptionsGeneral.lua index 9851be7..2ea0b0a 100644 --- a/Modules/Options/GeneralTab/QuestieOptionsGeneral.lua +++ b/Modules/Options/GeneralTab/QuestieOptionsGeneral.lua @@ -32,7 +32,7 @@ local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests") ---@class QuestieMap local QuestieMap = QuestieLoader:CreateModule("QuestieMap"); -QuestieOptions.tabs.general = { ... } +QuestieOptions.tabs.general = {} local optionsDefaults = QuestieOptionsDefaults:Load() local _GetAnnounceChannels diff --git a/Modules/Options/KeybindsTab/QuestieOptionsKeybinds.lua b/Modules/Options/KeybindsTab/QuestieOptionsKeybinds.lua index a85295d..2f2e3e2 100644 --- a/Modules/Options/KeybindsTab/QuestieOptionsKeybinds.lua +++ b/Modules/Options/KeybindsTab/QuestieOptionsKeybinds.lua @@ -8,7 +8,7 @@ local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils") ---@type l10n local l10n = QuestieLoader:ImportModule("l10n") -QuestieOptions.tabs.keybinds = { ... } +QuestieOptions.tabs.keybinds = {} local keybindOptions = {} diff --git a/Modules/Options/QuestieOptions.lua b/Modules/Options/QuestieOptions.lua index cf894e0..073633c 100644 --- a/Modules/Options/QuestieOptions.lua +++ b/Modules/Options/QuestieOptions.lua @@ -12,7 +12,7 @@ local l10n = QuestieLoader:ImportModule("l10n") ---@type QuestieCombatQueue local QuestieCombatQueue = QuestieLoader:ImportModule("QuestieCombatQueue") -QuestieOptions.tabs = { ... } +QuestieOptions.tabs = {} QuestieConfigFrame = nil local AceGUI = LibStub("AceGUI-3.0") diff --git a/Modules/Options/TrackerTab/QuestieOptionsTracker.lua b/Modules/Options/TrackerTab/QuestieOptionsTracker.lua index b611bc9..2eb9e8a 100644 --- a/Modules/Options/TrackerTab/QuestieOptionsTracker.lua +++ b/Modules/Options/TrackerTab/QuestieOptionsTracker.lua @@ -22,7 +22,7 @@ local l10n = QuestieLoader:ImportModule("l10n") --- COMPATIBILITY --- local C_Timer = QuestieCompat.C_Timer -QuestieOptions.tabs.tracker = { ... } +QuestieOptions.tabs.tracker = {} local _GetShortcuts local trackerOptions = {}