Commit Graph

358 Commits

Author SHA1 Message Date
Narcasung 460718e313 fix(tracker): show quest item shortcut buttons for custom quests
Item buttons only checked QuestieDB static data (sourceItemId /
requiredSourceItems), which custom server quests never have. Fall back
to GetQuestLogSpecialItemInfo to resolve the item live from the quest
log when the DB has no data for the quest.
2026-07-17 16:13:08 +02:00
Narcasung 8089b5f08c fix(tracker): show (Complete) and correct level for DB-less custom quests
Quests with no static DB entry (e.g. Ascension custom quest 175206) made
GetColoredQuestName bail out early on a nil name lookup, before it ever
reached the (Complete)/(Failed) suffix logic. The tracker's existing
fallback for that case never added the suffix either, and it computed
level via QuestieLib.GetTbcLevel (static-DB-only), which silently defaults
to level 1 and then gets scaled from that wrong base by Ascension's level
scaling. Since these quests also auto-collapse once complete (hiding the
tracker's other "Quest Complete!" indicator line), the title was the only
place that could show completion status, and it was silently swallowing it.

- QuestieTracker.lua: the "no DB name" fallback branch now appends
  (Complete) under the same collapseCompletedQuests/isMinimizable rule as
  the normal path, and uses the live quest object's own level instead of
  the static-only lookup.
- QuestieQuest.lua (PopulateQuestLogInfo): re-syncs quest.level from a live
  GetQuestLogTitle scan every update, since QuestieDB.GetQuest caches quest
  objects permanently and QuestLogCache never tracked level at all.
- TrackerUtils.lua (GetCompletionText): guards the Description[1] fallback
  against quests that have no top-level Description array, which was
  throwing and aborting that quest's tracker render entirely.
2026-07-15 17:20:42 +02:00
Narcasung 62956abb8e fix(map): keep world-map icons inside Magnify's native scroll clip
SetDrawOrder only recognized a standalone "Magnify-WotLK" addon, but this
setup bundles Magnify inside LootCollector (no separate .toc), so the check
always failed and every icon got reparented onto WorldMapFrame -- outside
WorldMapScrollFrame's clipped subtree -- and strata-forced to WorldMapFrame
instead of WorldMapButton, regardless of HBD's earlier correct parenting.
Detect the bundled Magnify via the _G.LootCollectorMagnify global and match
WorldMapButton's strata instead, mirroring LootCollector's own pins. Fixes
icon culling on all 4 edges during both zoom and pan, in normal and
objective-panel map modes.
2026-07-15 13:42:34 +02:00
Narcasung c09d30b832 Apply local fixes on top of upstream: tracker desync/drag/title, map icon zoom offset
- Compat/HBD.lua: fix world map pin offset math to account for zoom addons
  (e.g. Magnify) rescaling an ancestor frame instead of WorldMapButton itself;
  cull pins that fall outside the scroll frame's viewport when zoomed
- Compat/Compat.lua: add a short TTL to the chat-parsed objective progress
  cache so a stale entry can't be reapplied to an unrelated quest
- Modules/QuestieLearner.lua: re-point QuestiePlayer.currentQuestlog at the
  rebuilt quest table after invalidating QuestieDB's quest cache, fixing
  Tracker freezing on stale objective progress
- Modules/Tracker/QuestieTracker.lua: fall back to a formatted quest name
  when QuestieDB has no title for a quest (e.g. custom server quests)
- Modules/Tracker/TrackerBaseFrame.lua: force baseFrame movability on drag
  start instead of trusting the async-refreshed IsMovable() state
- Modules/Tracker/TrackerHeaderFrame.lua: wire up drag on the tracker icon
- Modules/Quest/QuestEventHandler.lua: force a full quest log reconciliation
  when the native quest log is opened

Squashed from prior commit-by-commit history to rebuild this working copy
on a clean fork of aron-w/Questie-X (restores the native GitHub fork link).
Per-fix rationale is preserved in project memory
(project_tracker_fixes.md, project_map_icon_offset.md).
2026-07-15 01:02:15 +02:00
Aron 9df64114df fix(quest-links): handle missing quest names 2026-07-11 12:29:21 +02:00
Aron d3795f9ae5 fix(init): persist compiled database metadata in cache 2026-07-05 16:32:11 +02:00
Aron 1f3d5fbb61 perf(init): skip redundant database compilation 2026-07-05 16:26:12 +02:00
Aron 558aeb3888 fix(tracker): update quest progress from unit log events 2026-07-05 16:23:06 +02:00
Xurkon 51fe8bbf5a fix: dedupe waypoint quest giver icons 2026-06-13 10:45:32 -05:00
Xurkon 8898dcf96a fix: harden quest poi filtering and objective refresh 2026-06-13 08:30:41 -05:00
Xurkon 12b30cd566 fix: purge lingering completed quest icons 2026-06-13 07:49:04 -05:00
Xurkon 3ebcedb362 fix: allow instant quest text toggle 2026-06-12 23:23:00 -05:00
Xurkon fb3c78351f fix: show learner secondary tooltips without spawns 2026-06-12 23:17:56 -05:00
Xurkon 2ef44eca15 fix: prefer static spawns in auto mode 2026-06-12 22:57:58 -05:00
Xurkon e96c47a739 fix: show learner tooltips in auto mode 2026-06-12 22:43:10 -05:00
Xurkon 70a99346e6 fix: suppress duplicate native quest POIs 2026-06-12 22:32:24 -05:00
Xurkon 71e172c4d0 fix: sync native objective POIs with Questie icons 2026-06-12 22:20:09 -05:00
Xurkon 9a9002a92e fix: reset player cache on prestige 2026-06-12 21:51:56 -05:00
Xurkon 0aaffce1e9 compat(lua50): fix Options tab tables {...} typo to {}
QuestieOptions.tabs.{auto,dbm,icons,nameplate} were initialized with {...}
instead of {}. At file scope in Lua 5.1 this silently captures the addon
varargs into the table; in Lua 5.0 it is a parse error. All sibling tabs use
{}. No behavioral change (Initialize repopulates the table).
2026-06-12 18:36:59 -05:00
Xurkon 9dce126735 compat(lua50): replace % modulo operator with math.mod shim
Lua 5.0 (Vanilla 1.12) has no % operator outside string formatting; it is a
parse error. Route the 9 arithmetic modulo sites through the existing math.mod
shim (Compat/Compat.lua) so the addon parses on 5.0 through Retail.

Sites: QuestieDB daily/weekly flag tests, QuestieEvent DMF cycle math,
QuestieLearner GUID/flag math, QuestiePlayer race/class flag tests.
2026-06-12 18:35:31 -05:00
Xurkon 76d4e6e4c8 docs: move recommendations to minimap icon sliders 2026-06-12 18:15:21 -05:00
Xurkon f6b8662884 docs: add tooltip performance recommendations 2026-06-12 18:05:03 -05:00
Xurkon 803904d6ba fix: prevent minimap fade from hiding icons 2026-06-12 18:00:25 -05:00
Xurkon 5c7c63bc18 fix: restore learner spawn and tooltip test coverage 2026-06-12 17:37:00 -05:00
Xurkon e706fa1130 fix: reduce questie fps stutter hot paths 2026-06-12 17:30:48 -05:00
Xurkon 90f1f31474 fix: refresh map tooltip objective progress 2026-06-12 17:23:10 -05:00
Xurkon 568cd44af8 fix: port Phase 1 perf/correctness audit fixes onto main
Brings the still-needed changes from questie-phase1perf that main lacked.
Main already had the Lua 5.0 shims (QuestieLoader bit/strsplit, QuestieStream
and QuestieSerializer math.mod sweep), so those are omitted.

- QuestieNameplate: skip missing entries instead of return-aborting the whole
  activeGUIDs loop (one bad unit no longer stalls every nameplate update)
- QuestieQuest.ClearAllNotes: skip DB-missing quests instead of aborting, so
  remaining quests' notes still get cleared
- QuestieOptionsTracker: fix fadeTickerValue:Cancel -> fadeTicker:Cancel (3x);
  fadeTickerValue is a number, the ticker handle is fadeTicker
- QuestieCommsData: nil-guard GetNPC/GetObject before reading .name
- QuestieAnnounce: bound the alreadySentBandaid dedup cache (reset at 1000)
- QuestieDB.IsComplete: hoist GetQuest into expectedQuest (one call, not two)
- QuestieFramePool/QuestieFrame: drop the dead BaseOnUpdate ticker branch
  (BaseOnUpdate was never defined; behavior was always OnUpdate=nil)
- QuestieLib: document unused questId arg on Ascension_IsScalingEnabled
- Database/Corrections x3: strip stray UTF-8 BOM
- Questie-X.toc: remove duplicate QuestieSlash.lua load line
2026-06-12 06:48:53 -05:00
Xurkon 1f8fa20e00 fix(learner): stop recording bystander kills as your own
Uncredited kills (mobs other players killed that you never engaged)
passed px,py=nil to LearnNPC, whose GetPlayerCoords fallback stored YOUR
position as the mob's spawn and incremented the kill count. Gate spawn
recording (LearnNPC + _StoreGuidSpawnEvidence) on a captured position, so
only credited kills with a real position store a spawn. Bystander kills
no longer pollute coordinates or inflate counts.
2026-06-12 01:30:37 -05:00
Xurkon 152e823c04 fix(quest): skip stale frames in Show/HideQuestIcons instead of crashing
ShowQuestIcons/HideQuestIcons indexed icon (=_G[frameName]) when it can
be nil for a registry entry whose frame was already reset, crashing the
fade pass (attempt to index local 'icon'). Guard icon/icon.data/
icon.data.QuestData and skip stale frames; ShowQuestIcons no longer
error()s on the desync.
2026-06-12 00:57:18 -05:00
Xurkon 49774336cc fix(tooltip): define _TooltipHasLeftLine before its callers
The dedupe helper was a local function defined after
AddUnitDataToTooltip, so that function resolved it as a nil global and
every unit tooltip errored (attempt to call global '_TooltipHasLeftLine').
Moved it above all Add*DataToTooltip functions.
2026-06-12 00:56:37 -05:00
Xurkon 150c59fa77 fix(tooltip): robust NPC/object ID resolution via learner GUID parsers
Expose QuestieLearner:GetIdAndTypeFromGUID / GetObjectIdFromGUID /
GetNpcIdFromGUID (they handle modern dash GUIDs AND legacy 0x hex /
GameObject GUIDs). Tooltips now fall back to these when strsplit('-',guid)
can't parse the GUID, so NPC IDs no longer silently fail to write on
hex-GUID units; the Object ID line resolves from the object's GUID when
its name isn't in the lookup. IDs deduped per tooltip.
2026-06-11 17:53:36 -05:00
Xurkon 5abeff2768 fix(tooltip): keep Item/NPC ID lines from vanishing on re-hover
The ID lines were gated by lastItemId/lastGuid (only added when the
hovered item/unit changed). WoW clears and re-fires OnTooltipSetItem/
OnTooltipSetUnit for the same item/unit and rebuilds the tooltip, so the
gate skipped re-adding the line on the rebuilt tooltip and the ID
disappeared. Add the ID line on every render instead, deduped per
tooltip via _TooltipHasLeftLine so it shows exactly once.
2026-06-11 16:37:40 -05:00
Xurkon 7bd14b80fc feat(learner): exclude critters; fix Sunstrider object mis-keyed to areaId 3430
- Critters are never quest-relevant. Added a static CRITTER_NPC_SET (common
  classic critters) plus runtime detection via UnitCreatureType on
  mouseover/target (covers Ascension custom critters). LearnNPC and the kill
  handler skip critters; InjectLearnedData purges already-recorded ones; and
  critters are purged on sight when a unit token is available.
- Object/NPC spawns mis-stored under Eversong parent areaId 3430 (e.g. object
  180516 'Shrine of Dath'Remar' on Sunstrider) now migrate to uiMapId 1241,
  along with the [9]/[5] home-zone field. Legit Eversong data is keyed 1941,
  so any 3430 key is mis-stored Sunstrider data.

Verified in Tests/QuestieLearnerCritterPurge_spec.lua.
2026-06-11 16:29:41 -05:00
Xurkon 32c538de15 fix(learner): stop InjectLearnedData from corrupting saved spawns
Two bugs made saved learner spawns collapse to one pin on every login:

1. The spawn zone-key migration was inverted: it ran
   GetAreaIdByUiMapId(1241) -> Eversong parent areaId 3430 and moved
   Sunstrider coords there (wrong map / NE corner), deduping distinct
   coords via InsertIfNewBucket along the way. Now it converts only
   legacy areaId keys FORWARD to the canonical uiMapId and leaves uiMapId
   keys untouched. Same for the [9]/[5] home-zone fields.

2. Sanitize de-duplicated coords with the flat COORD_GRID (2.0) instead
   of the per-zone grid, collapsing Sunstrider's tightly-packed spawns
   (grid 0.5). Now uses GetCoordGridForZone(zoneId).

Both rewrote learned.npcs in place, persisting the damage to
SavedVariables. Regression test in QuestieLearnerMultiSpawn_spec.lua.
2026-06-11 15:49:29 -05:00
Xurkon 6355545890 fix(learner): show every learned pin on Sunstrider, not a clustered dot
A prior change (dd630fd) kept clustering enabled on Sunstrider Isle in
learner mode to avoid pin fan-out, but that collapsed several distinct
learned coordinates (e.g. 7 Arcane Wraith spots) into a single pin --
breaking the DB-building workflow where every learned spawn must be
visible. The SavedVariables data was correct the whole time; this was a
display regression. Sunstrider (1241) now shows every distinct pin by
default in all data-source modes; consolidation only happens when the
player explicitly raises the Dense Pin Clustering Aggressiveness knob.
2026-06-11 15:34:04 -05:00
Xurkon 900ff4a4e4 fix(map): extend minimap fade range slider 2026-06-11 15:17:18 -05:00
Xurkon eebd26cad8 fix(learner): restore incomplete learner spawn lookups 2026-06-11 15:13:35 -05:00
Xurkon 82c2e41400 fix(learner): preserve quest giver spawn overrides 2026-06-11 11:58:34 -05:00
Xurkon 3a293e6a3c fix(map): harden quest completion pin cleanup 2026-06-11 11:51:20 -05:00
Xurkon 77a39b512c fix(tooltip): collapse stacked Ascension quest-progress lines (#9)
The Ascension server appends a new progress line on every objective
update instead of replacing it, so tooltips stacked 0/8 1/8 2/8 3/8 for
one objective. New always-on DedupeAscensionProgressLines collapses each
stack to its most-progressed line. It only hides a line when the same
tooltip holds another progress line with the same objective text AND
denominator, so other addons' lines and Questie's own single-line
objectives are never touched. Separate from the opt-in full-strip option
(#16). Unit-tested in Tests/QuestieTooltipDedupe_spec.lua.
2026-06-11 07:43:57 -05:00
Xurkon dc155b6583 fix(map): completed quest pins stuck on world map until reload (#9)
Draw-queue race: ProcessQueue processes the world-map and minimap queues
independently. When a frame was unloaded while still queued, its
minimap-queue entry could trigger the deferred Unload first (removing
both icons and clearing _needsUnload), then a later map-queue entry
re-added the world-map icon -- orphaned, since Unload had nil'd the
questIdFrames/_G reference, so it lingered until /reload while the
minimap cleared. Unload now drops the frame's pending draw-queue entries
(new QuestieMap:DequeueFrameDrawCalls) so an unloaded frame can never be
re-added to a map.
2026-06-11 07:13:01 -05:00
Xurkon abef53cede fix(learner): key credited kills by captured map space 2026-06-11 06:50:37 -05:00
Xurkon d2c36a4a95 fix(learner): kills never recorded coords (credited used before assignment)
The kill handler's position capture ran inside 'if credited then', but
credited was read before its 'local credited = ...' assignment a few
lines below, so it was always nil and px,py were never captured -- every
killed NPC stayed spawnSource='fallback' with no [7] and drew no learner
pins regardless of kill count. Move the credited computation above the
capture and nil-guard a 0,0 position. GetPlayerCoords now uses the robust
GetCurrentPlayerPosition (Sunstrider-corrected), returning nil when
invalid so no 0,0 pins are recorded. Reverts the earlier HBD GetPlayerCoords
approach which treated the wrong symptom and caused spurious pins.
2026-06-10 21:46:18 -05:00
Xurkon 5e4ac2d64c fix(map): proactively hide filtered quest icons on the minimap (#11)
FadeLogic only re-checked ShouldBeHidden when deciding whether to
re-show an already-hidden icon, so a filtered quest (e.g. a dungeon
quest) that was already visible -- or that HBD's pin renderer showed on
coming into range -- was never hidden on the minimap while the world map
hid it. FadeLogic now proactively FakeHides any in-range icon whose
ShouldBeHidden is true, in both minimap fade paths; the second path also
gains the #17 minimap-radius cutoff gating it was missing.
2026-06-10 21:31:41 -05:00
Xurkon 0ebfb51ded fix(learner): capture spawn coords via HBD so learner pins persist
GetPlayerCoords used raw GetPlayerMapPosition('player'), which returns
0,0 when the world map isn't on the player's zone (the usual case) and
mis-reports on Ascension subzones like Sunstrider. Learn events captured
no position, so NPCs were saved spawnSource='fallback' with no [7]
spawns and their learner-only pins never persisted -- showing briefly
after a live kill then vanishing. Read from HBD:GetPlayerZonePosition()
(robust SetMapToCurrentZone/Sunstrider-corrected, cached), falling back
to the old API only if HBD is unavailable.
2026-06-10 21:04:01 -05:00
Xurkon 49bc586c15 fix(tooltip): make Ascension quest-line stripping opt-in (#16)
HideAscensionQuestLines ran on every tooltip and removed any line
matching a quest-objective pattern (N/M, [N] ...), clobbering other
tooltip addons' lines (durability, stack counts, etc.). Gate it behind a
new General-tab option 'Hide Ascension quest progress lines' (default
off) so Questie no longer modifies tooltip lines it does not own by
default. Existing installs read the unset option as off automatically.
2026-06-10 20:39:21 -05:00
Xurkon 6ad4308940 fix(map): robustly hide Callboard/Contract Board quests below 60 (#10)
Ascension board bounties (e.g. NPC 24 'Outlaw's Contract Board') aren't
reliably flagged repeatable, so IsRepeatable missed them and their ! kept
showing below 60. Add QuestieDB.IsBoardQuest (detects starter NPC/object
names containing 'board', cached per quest); the hide-below-60 option now
hides repeatable OR board quests in both the draw path and ShouldBeHidden.
2026-06-10 20:31:22 -05:00
Xurkon e852e02d32 fix(tooltip): make ElvUI tooltip style opt-in, reset for existing installs (#16)
The ElvUI tooltip style shipped on by default, so Questie restyled every
default WoW tooltip (stripping the border) for users who never asked for
it and don't run ElvUI. Default is now false, plus migration [8] resets
it off once for existing profiles.
2026-06-10 20:26:41 -05:00
Xurkon f9b19218cb fix(quest): snapshot completion at QUEST_REMOVED so turn-ins are not misclassified as abandoned (#9)
Some Ascension turn-ins (crafting/auto-complete) fire QUEST_REMOVED with
no preceding QUEST_TURNED_IN, so the 1s abandon timer runs after
QuestLogCache.RemoveQuest has cleared the quest, making IsComplete return
0 and the turned-in quest get marked abandoned -- its objective pins and
turn-in ? then linger. Capture IsComplete at QUEST_REMOVED time and use
that snapshot in MarkQuestAsAbandoned.
2026-06-10 19:27:56 -05:00
Xurkon 1c0a891efd fix(map): minimap range cutoff no longer clips visible icons (#17)
The cutoff hid icons beyond its yard value before checking the minimap's
visible radius, so the default 100 hid icons that were clearly on the
minimap (view radius is 133-466 yd by zoom). Now it only clips icons
outside the visible circle: HBD's pin renderer gates the cutoff on
dist > 1, and QuestieMap FadeLogic raises the effective cutoff to at
least the current minimap view radius via new HBDPins:GetMinimapRadius().
2026-06-10 19:24:39 -05:00