fix(tooltip): stop hiding ID lines and other addons' tooltip text

HideAscensionQuestLines kept a questBlockActive flag and hid every
following non-indented line after an objective line until an indented
one. Questie's own Item/NPC/Object ID lines and other addons' additions
(e.g. an item-count overlay) are appended at the bottom of the tooltip,
so they were wiped too. Now only lines matching an Ascension objective
pattern are hidden; trailing lines are left intact.
This commit is contained in:
Xurkon
2026-06-10 06:17:39 -05:00
parent 9ea82fcdb5
commit 611e61e9c9
2 changed files with 14 additions and 13 deletions
+1
View File
@@ -36,6 +36,7 @@
### Bug Fixes
- **[Tooltip - Stop Eating ID Lines & Other Addons' Tooltip Text]** `HideAscensionQuestLines` (which hides Ascension's injected quest-objective progress text from tooltips) was too greedy: once it found an objective line (e.g. `0/8 Arcane Wraith slain`) it kept hiding every following non-indented line until an indented one. Because Questie's own `Item ID`/`NPC ID`/`Object ID` lines and other addons' additions (e.g. an item-count overlay) are appended at the *bottom* of the tooltip — after the objective block — a refresh pass wiped them too, so the ID you needed to report data never showed. It now hides only the lines that themselves match an Ascension objective pattern (`N/M`, `[N] ...`, `- N/M ...`) and never the trailing lines, so IDs and other addons' text are left intact.
- **[Learner - Import Updates Map & Stats Live (No Reload)]** After importing learned data, the Database tab's live entry counts now update immediately and the imported spawns appear on the map/minimap without a `/reload`. `MergeImport` now runs `QuestieQuest:SmoothReset()` (guarded) after `InjectLearnedData` so freshly merged NPC/object spawns are recalculated and redrawn, and the import dialog fires `AceConfigRegistry:NotifyChange("Questie")` so the "Total entries" stats refresh in place. Also hardened the import against pathological payloads — `ValidateImport` rejects strings claiming more than 200,000 entries before the synchronous merge runs — and the shared serialize/encode step is now wrapped defensively so a malformed sub-entry surfaces as a clean error instead of a Lua error.
- **[Learner - Robust Safety Fallbacks For All Types]** Hardened the learner's data-ingestion paths against malformed/partial data for every learner type (NPC/object/item/quest). The spawn validator now checks object spawn coordinates (key `[4]`) in addition to NPC spawns (key `[7]`) — previously object coords were unvalidated. The incoming-data merge skips malformed zone keys and coordinates (non-number/out-of-range) per entry instead of erroring, and guards the item drop-list merge against non-number NPC ids. The live comms-merge flush now isolates each broadcast in a `pcall`, so a single malformed entry can't abort the batch or break the live-update loop, and the post-merge `InjectLearnedData` is likewise guarded.
- **[Learner - Hardened Import/Merge For Multi-Player Data]** Importing learned data merged from several different players is now safe and clean. Fixed a prefix-validation bug in `ValidateImport` (`not str:sub(...) == x` parsed as `(not str:sub(...)) == x`, always false, so non-Questie strings were never rejected). `MergeImport` now: ensures the learner stores exist (so a fresh profile can import), merges each entry **synchronously and defensively** via `_ApplyIncomingNetworkMerge` (which validates key/coordinate structure and only adopts fields the local store is missing — never overwriting good local data), isolates every entry in a `pcall` so one corrupt entry is skipped/counted instead of aborting the import or corrupting the store, and reports accurate `merged / skipped / rejected` counts. Merging synchronously also fixes `InjectLearnedData` previously running before the queued merges landed.
+13 -13
View File
@@ -256,9 +256,7 @@ function _QuestieTooltips:HideAscensionQuestLines(tooltip)
if not Questie.db.profile.enableTooltips then return end
local numLines = tooltip:NumLines()
if not numLines or numLines < 1 then return end
local questBlockActive = false
for i = 2, numLines do
local fontString = _G[tooltip:GetName() .. "TextLeft" .. i]
if fontString then
@@ -267,19 +265,21 @@ function _QuestieTooltips:HideAscensionQuestLines(tooltip)
local cleanText = string.gsub(text, "|[cC]%x%x%x%x%x%x%x%x", "")
cleanText = string.gsub(cleanText, "|[rR]", "")
cleanText = string.match(cleanText, "^%s*(.-)%s*$") or cleanText
-- Optional [-] or bullets in front of objective lines
-- Hide ONLY the Ascension-injected objective progress lines themselves
-- (e.g. "0/8 Arcane Wraith slain", "[1] ...", "- 0/2 ...").
--
-- We intentionally do NOT hide the lines that follow. The previous
-- behavior set a "questBlockActive" flag and then wiped every later
-- non-indented line until it hit an indented one — which also removed
-- Questie's own "Item ID"/"NPC ID"/"Object ID" lines and any other
-- addon's tooltip additions (e.g. an item-count overlay), because those
-- are appended at the BOTTOM of the tooltip, after the objective block.
-- Matching each objective line individually removes the Ascension spam
-- without touching anything else on the tooltip.
if string.match(cleanText, "^%[%d+.-%]") or string.match(cleanText, "^%d+/%d+") or string.match(cleanText, "^%-.-%d+/%d+") then
fontString:SetText("")
fontString:Hide()
questBlockActive = true
elseif questBlockActive then
if string.match(text, "^%s+") then
questBlockActive = false
else
fontString:SetText("")
fontString:Hide()
end
end
end
end