diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ae338c..e3a5195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ ### Bug Fixes +- **[Map - Minimap Range Cutoff No Longer Clips Visible Icons]** (#17) The "Minimap Icon Range Cutoff" added in a prior build hid every quest icon beyond its yard value *before* checking whether the icon was within the minimap's visible circle. Because the minimap's view radius is 133–466 yards depending on zoom, a cutoff of 100 (the default) hid icons that were clearly on the minimap — they only appeared once the player was very close. The cutoff now only clips icons that fall *outside* the minimap's visible radius: in HBD's pin renderer it is gated on `dist > 1` (outside the visible circle), and in `QuestieMap`'s minimap `FadeLogic` the effective cutoff is raised to at least the current minimap view radius (read from the new `HBDPins:GetMinimapRadius()`). Icons within the visible minimap always show again; the cutoff still controls how far edge-floating icons reach for far-apart objectives when zoomed out. - **[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 - Don't Purge NPCs With Useful State But No Spawns]** The `InjectLearnedData` purge loop was deleting entire NPC entries from `Questie.dbLearner.global.npcs` whenever `data[7]` (spawns) was empty, even if the entry still had a name, home zone, recorded kills, or quest references. This caused learner data to silently disappear on `/reload` for NPCs that had been learned but never killed in a position the learner could record (e.g. party-kill position attribution fix now passes nil coords for uncredited kills). Now only purges when ALL of name, zone, kills, and quest references are missing. Entries with other useful state get `data[7] = nil` instead so the row survives. - **[Learner - Import Shows Actual Spawn Coordinates Added]** The import completion message now shows how many spawn *coordinates* were really added (e.g. "Added 842 new spawn coordinates") rather than just entry counts. Counts `[7]` for NPCs and `[4]` for objects before and after the merge. A sparse export that merges entries but carries no coords means nothing new will appear on the map — the new message makes this clear. diff --git a/Compat/HBD.lua b/Compat/HBD.lua index 6661311..495dd8a 100644 --- a/Compat/HBD.lua +++ b/Compat/HBD.lua @@ -468,9 +468,15 @@ local function drawMinimapPin(pin, data) -- data.floatOnEdge is replaced by (data.floatOnEdge and ((pin.texture and pin.texture.a and pin.texture.a ~= 0) or pin.texture == nil)) -- icons will now only float on edge if they have an opacity which is not 0 or if no texture exist. data.distanceFromMinimapCenter = dist + -- Minimap range cutoff: only clamp icons that fall OUTSIDE the minimap's visible + -- radius (dist > 1, i.e. edge-floating icons). Icons that are actually within the + -- visible minimap circle must always show, otherwise the cutoff hides quest icons + -- that are clearly on the minimap whenever its view radius (133-466 yd depending on + -- zoom) exceeds the cutoff yard value — the regression reported in #17. The cutoff + -- then only limits how far edge-floating icons reach for far-apart objectives. local minimapVisibilityCutoff = pin.minimapVisibilityCutoff or (Questie and Questie.db and Questie.db.profile and Questie.db.profile.minimapIconRangeCutoff) - if minimapVisibilityCutoff and lastXY and lastYY and data.x and data.y then + if dist > 1 and minimapVisibilityCutoff and lastXY and lastYY and data.x and data.y then local xd, yd = lastXY - data.x, lastYY - data.y local distance = (xd * xd + yd * yd)^0.5 if distance > minimapVisibilityCutoff then @@ -727,6 +733,13 @@ function pins:RefreshMinimap() UpdateMinimapIconPosition() end +-- Returns the minimap's current visible radius in yards (last value computed by +-- UpdateMinimapPins). Used by Questie's minimap FadeLogic so the range cutoff only +-- clips icons that are genuinely OUTSIDE the visible minimap, never icons within it. +function pins:GetMinimapRadius() + return mapRadius +end + function pins:SetMinimapVisibilityCutoff(cutoff) for pin, data in pairs(minimapPins) do pin.minimapVisibilityCutoff = cutoff diff --git a/Modules/Map/QuestieMap.lua b/Modules/Map/QuestieMap.lua index 62947c7..1e4d91e 100644 --- a/Modules/Map/QuestieMap.lua +++ b/Modules/Map/QuestieMap.lua @@ -661,7 +661,18 @@ function QuestieMap:DrawManualIcon(data, areaID, x, y, typ) local distance = math.sqrt(xd * xd + yd * yd) local minimapVisibilityCutoff = self.minimapVisibilityCutoff or profile.minimapIconRangeCutoff or 100 - if (distance > minimapVisibilityCutoff) then + -- Only let the range cutoff hide icons that fall OUTSIDE the minimap's + -- visible radius. Icons within the visible minimap circle must always show, + -- otherwise a cutoff smaller than the current view radius (133-466 yd by + -- zoom) hides quest icons that are clearly on the minimap (#17). The cutoff + -- then only limits how far edge-floating icons reach. + local minimapRadius = (HBDPins and HBDPins.GetMinimapRadius and HBDPins:GetMinimapRadius()) or 0 + local effectiveCutoff = minimapVisibilityCutoff + if minimapRadius and minimapRadius > effectiveCutoff then + effectiveCutoff = minimapRadius + end + + if (distance > effectiveCutoff) then self:FakeHide() return elseif self.hidden then