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).
This commit is contained in:
@@ -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.
|
- **[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.
|
- **[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.
|
- **[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]=<addonTable>`) instead of being empty, and the `{ ... }` expression is also a hard parse error under strict Lua 5.0. Changed all five to `{}`.
|
||||||
|
|
||||||
### Tooltip
|
### Tooltip
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ local function GetExpandedFontList()
|
|||||||
return fonts
|
return fonts
|
||||||
end
|
end
|
||||||
|
|
||||||
QuestieOptions.tabs.arrow = { ... }
|
QuestieOptions.tabs.arrow = {}
|
||||||
|
|
||||||
function QuestieOptions.tabs.arrow:Initialize()
|
function QuestieOptions.tabs.arrow:Initialize()
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests")
|
|||||||
---@class QuestieMap
|
---@class QuestieMap
|
||||||
local QuestieMap = QuestieLoader:CreateModule("QuestieMap");
|
local QuestieMap = QuestieLoader:CreateModule("QuestieMap");
|
||||||
|
|
||||||
QuestieOptions.tabs.general = { ... }
|
QuestieOptions.tabs.general = {}
|
||||||
local optionsDefaults = QuestieOptionsDefaults:Load()
|
local optionsDefaults = QuestieOptionsDefaults:Load()
|
||||||
|
|
||||||
local _GetAnnounceChannels
|
local _GetAnnounceChannels
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils")
|
|||||||
---@type l10n
|
---@type l10n
|
||||||
local l10n = QuestieLoader:ImportModule("l10n")
|
local l10n = QuestieLoader:ImportModule("l10n")
|
||||||
|
|
||||||
QuestieOptions.tabs.keybinds = { ... }
|
QuestieOptions.tabs.keybinds = {}
|
||||||
|
|
||||||
local keybindOptions = {}
|
local keybindOptions = {}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ local l10n = QuestieLoader:ImportModule("l10n")
|
|||||||
---@type QuestieCombatQueue
|
---@type QuestieCombatQueue
|
||||||
local QuestieCombatQueue = QuestieLoader:ImportModule("QuestieCombatQueue")
|
local QuestieCombatQueue = QuestieLoader:ImportModule("QuestieCombatQueue")
|
||||||
|
|
||||||
QuestieOptions.tabs = { ... }
|
QuestieOptions.tabs = {}
|
||||||
QuestieConfigFrame = nil
|
QuestieConfigFrame = nil
|
||||||
|
|
||||||
local AceGUI = LibStub("AceGUI-3.0")
|
local AceGUI = LibStub("AceGUI-3.0")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ local l10n = QuestieLoader:ImportModule("l10n")
|
|||||||
--- COMPATIBILITY ---
|
--- COMPATIBILITY ---
|
||||||
local C_Timer = QuestieCompat.C_Timer
|
local C_Timer = QuestieCompat.C_Timer
|
||||||
|
|
||||||
QuestieOptions.tabs.tracker = { ... }
|
QuestieOptions.tabs.tracker = {}
|
||||||
|
|
||||||
local _GetShortcuts
|
local _GetShortcuts
|
||||||
local trackerOptions = {}
|
local trackerOptions = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user