From 90f1f31474a547e98b89b8aea9817920d1f06850 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Fri, 12 Jun 2026 17:23:10 -0500 Subject: [PATCH] fix: refresh map tooltip objective progress --- CHANGELOG.md | 1 + Modules/Tooltips/MapIconTooltip.lua | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f20df0d..babe837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ ### Bug Fixes +- **[Map Tooltip - Objective Progress Refresh]** (#18) Minimap and world-map objective pin tooltips now refresh the underlying objective before rendering progress text, so kill counters update on hover instead of staying at the count captured when the pin was drawn. - **[Learner - Stop Recording Bystander Kills As Your Own]** Kills of mobs you never engaged (other players killing nearby mobs) were being recorded as spawns at *your* position and inflating the kill count. The combat-log handler passed `px,py=nil` to `LearnNPC` for uncredited kills, whose `GetPlayerCoords` fallback then stored your location as the mob's spawn. Spawn recording (`LearnNPC` + GUID evidence) is now gated on a captured position, so only credited kills (your own / party kills you engaged, where a real position was captured) store a spawn. Bystander kills no longer pollute the learner with your coordinates or inflate the count; the NPC's name/quest data is still learned via mouseover/target. - **[Fix - Fade Pass Crash On Stale Frame]** Hardened `ShowQuestIcons`/`HideQuestIcons` against a stale-frame desync (`attempt to index local 'icon'`): a frame name lingering in the registry after its frame was reset is now skipped gracefully instead of erroring out of the whole fade pass (and `ShowQuestIcons` no longer `error()`s on the desync), with nil-guards on `icon`/`icon.data`/`icon.data.QuestData`. - **[Fix - Tooltip Crash On Unit Hover]** Fixed a crash on every unit tooltip (`attempt to call global '_TooltipHasLeftLine'`): the dedupe helper was defined *after* `AddUnitDataToTooltip`, so that function couldn't see the local. It's now defined before all `Add*DataToTooltip` functions. diff --git a/Modules/Tooltips/MapIconTooltip.lua b/Modules/Tooltips/MapIconTooltip.lua index 96d5247..b95fbb8 100644 --- a/Modules/Tooltips/MapIconTooltip.lua +++ b/Modules/Tooltips/MapIconTooltip.lua @@ -69,6 +69,18 @@ local DEFAULT_WAYPOINT_HOVER_COLOR = { 0.93, 0.46, 0.13, 0.8 } local lastTooltipShowTimestamp = GetTime() +function MapIconTooltip:RefreshObjectiveForTooltip(objective) + if not objective or not objective.Update then + return + end + + -- Map/minimap pins can remain on screen while quest progress changes. Refresh the + -- shared objective before rendering so tooltip counters do not stay at the value + -- captured when the pin was originally drawn. + objective.isUpdated = false + objective:Update() +end + local function _GetWorldMapTooltipSourceLine(pinData) -- Show learner spawn data for the hovered map icon when available. local id = pinData and pinData.Id @@ -870,6 +882,7 @@ end function _MapIconTooltip:GetObjectiveTooltip(icon) local tooltips = {} local iconData = icon.data + MapIconTooltip:RefreshObjectiveForTooltip(iconData.ObjectiveData) local text = iconData.ObjectiveData.Description local color = QuestieLib:GetRGBForObjective(iconData.ObjectiveData) if iconData.ObjectiveData.Needed then