Commit Graph

549 Commits

Author SHA1 Message Date
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 1b0f145c87 perf(l10n): cache literal (no-arg) translations
Add a locale-keyed cache for no-argument translation lookups so repeated
literal keys resolve without redoing the lookup chain. Reset on locale change
and on locale override application.

Ported from phase3-measured-perf (cherry-pick -x 970dd88), adapted to current
main (hoisted the per-locale cache-table creation; excludes the branch's audit
doc and gitignored test).
2026-06-12 22:54:06 -05:00
Xurkon fb22cd5b2d docs(changelog): note learner tooltips now show in auto mode 2026-06-12 22:46:46 -05:00
Xurkon e96c47a739 fix: show learner tooltips in auto mode 2026-06-12 22:43:10 -05:00
Xurkon 72bff01724 docs(changelog): correct POI entry to match duplicate-suppression approach
The 1.6.4 changelog described an earlier SyncBlizzardObjectivePOIs helper that
was superseded by the per-quest duplicate-POI suppression in QuestieCompat
(commit 70a9934). Update both CHANGELOG.md and the HTML changelog to describe
the actual shipped behavior.
2026-06-12 22:41:13 -05:00
Xurkon 70a99346e6 fix: suppress duplicate native quest POIs 2026-06-12 22:32:24 -05:00
Xurkon a7de3eccb4 docs(changelog): finalize 1.6.4 — Lua 5.0 stage 1, POI sync, cache/prestige fixes
Update the 1.6.4 entry to reflect the consolidated main: add the Lua 5.0
compatibility items (modulo->math.mod, Options {...} typo) and the native
objective POI sync, prestige cache reset, and quest completion cache fixes.
Fix the stale perf-refactor note that referenced the now-removed
phase2-lua50-sweep branch; remaining measured perf work is on
phase3-measured-perf and being cherry-picked one at a time. Mirror into the
HTML changelog and bump its version badge to v1.6.4.
2026-06-12 22:31:52 -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 9fa0164318 fix: clear quest completion cache on refresh 2026-06-12 21:40:23 -05:00
Xurkon 60ed76598a fix: gate felendren behind aggression 2026-06-12 20:54:06 -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 493545a4d4 docs(readme): update notice to reflect v1.6.4 maintenance release; bump badge to 1.6.4 2026-06-12 06:51:54 -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 682dd1fa08 chore: untrack local test specs 2026-06-11 11:53:29 -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 48a948af72 harden(learner): coordinate-consistent kill spawn keying + capture diagnostic + regression test
- Key the kill spawn under the same map space the coords were captured in
  (GetCurrentPlayerPosition mapId), not a separately-derived GetZoneId()
  that can disagree on subzones and place pins on the wrong map.
- Throttled debug warning when a credited kill yields no usable position,
  so a systematic capture failure is diagnosable.
- Add Tests/QuestieLearnerKillCapture_spec.lua: drives the real kill
  handler end-to-end and asserts capture, the 0,0 guard, and the per-mode
  display contract (learner shows learned spawn, static never leaks it).
2026-06-11 07:04:20 -05:00
Xurkon 92d1ad09b7 fix(map): harden dungeon quest detection 2026-06-11 06:59:08 -05:00
Xurkon abef53cede fix(learner): key credited kills by captured map space 2026-06-11 06:50:37 -05:00
Xurkon e755416f8a fix(map): align minimap pins at non-1 UI scales 2026-06-11 06:49:51 -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 cee005fc63 fix(map): pixel-snap minimap icons to align with native blips at fractional scales (#6)
At fractional UI scales (e.g. 0.71 game scale + Windows display scaling)
the raw fractional pin offset landed icons between physical pixels,
rendering blurry and offset from the engine-drawn native quest blips.
Snap the offset to a whole physical pixel via the minimap's effective
scale so Questie's icons sit on the same grid as native markers.
2026-06-10 20:34:20 -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