Commit Graph

479 Commits

Author SHA1 Message Date
Xurkon 6793805ebe remove staged bloat 2026-06-01 18:00:06 -05:00
Xurkon 164584ca87 fix: Sunstrider pin regression, ghost pins, and learner zone normalization
- Fix: isSunstrider block in _MergeSpawnEvidence now checks IsAscensionProtected
  before writing learner data to npcDataOverrides. Without this guard, each Mana
  Wyrm kill overwrote AscensionDB's z1241=5 data with learner z3431 coords.

- Fix: Clustering disabled for zone 1241 (Sunstrider Isle) in _DrawObjectiveIcons
  so all 5 AscensionDB spawn pins display individually instead of collapsing to 2.

- Fix: Ghost pin loop in AvailableQuests.lua -- 'while frames[i]' was iterating a
  string-keyed table with a numeric index (never iterated). Changed to pairs().

- Fix: NormalizeSpawnZoneKey now uses ZoneDB.areaIdToUiMapId for all zones so
  learner evidence is stored under map IDs (e.g. 1241) not area IDs (e.g. 3431),
  matching AscensionDB's key space. Applied in LearnNPC and _StoreGuidSpawnEvidence.

- Fix: isSunstrider detection in _MergeSpawnEvidence updated from hardcoded
  zoneId==3431 check to IsSunstriderNativeZone() since zone IDs are now normalized
  to map IDs at storage time.
2026-05-25 19:02:56 -05:00
Xurkon 7a7b1eb727 docs: correct Phase 2-5 status — implemented, awaiting in-game test verification
- Phase 2: marked ⚠️ with known spec test failures (quarantined)
- Phase 3-5: marked ⚠️ as implemented, not in-game verified
- Removed  COMPLETE claims that overstate test coverage
2026-05-24 00:44:34 -05:00
Xurkon 7ea4061959 fix(quest): Phase 1 compat — guard quest-log-aware frame unload
Prevent premature frame unloading for completed-but-logged quests:
- AvailableQuests: UnloadUndoable() guard on currentQuestlog
- DailyQuests: HandleDailyQuests() guard on currentQuestlog
- QuestieQuest: IsSafeToUnloadQuestFrames() helper + HideQuest() guard
- TooltipHandler: IsQuestFlaggedCompleted gated by currentQuestlog
- TrackerUtils: fallback IsComplete gated by currentQuestlog

Revert: git revert HEAD --no-edit
2026-05-24 00:43:41 -05:00
Xurkon 7863985974 docs: mark Phase 5 COMPLETE in PROGRESS.md 2026-05-24 00:37:53 -05:00
Xurkon a0c827f6b1 test(learner): Phase 5 unit tests for comms data validation 2026-05-24 00:37:41 -05:00
Xurkon 598f7d3652 feat(learner): Phase 5 — comms data validation 2026-05-24 00:37:27 -05:00
Xurkon 0de46e653f docs: mark Phase 4 COMPLETE in PROGRESS.md 2026-05-24 00:36:53 -05:00
Xurkon 6eaa67277f test(learner): Phase 4 unit tests for tooltip population 2026-05-24 00:36:40 -05:00
Xurkon c5d8c5ffe5 feat(learner): Phase 4 — real-time tooltip for learned spawns 2026-05-24 00:36:19 -05:00
Xurkon dd0640b574 docs: mark Phase 3 COMPLETE with commit hashes 2026-05-24 00:34:15 -05:00
Xurkon 0c6f8fa975 test(learner): Phase 3 unit tests for spawn merge 2026-05-24 00:33:55 -05:00
Xurkon 021d1b942b feat(learner): Phase 3 — weighted spawn merge 2026-05-24 00:33:09 -05:00
Xurkon 5113b28361 docs: mark Phase 2 COMPLETE with commit hashes 2026-05-24 00:30:27 -05:00
Xurkon 59b58ae46a test(learner): Phase 2 unit tests for spawn evidence and pruning 2026-05-24 00:30:03 -05:00
Xurkon 6c121e7bc4 feat(learner): Phase 2 — GUID-based spawn evidence and outlier pruning 2026-05-24 00:29:47 -05:00
Xurkon 44244f504f debug(Arrow): show spawnList coords and world coords for target
- PrintTargetCoords: add world coords computed from zone coord + uiMapId
- _CollectObjective debug: show spawnList[id] zone, firstCoord, isLearned per entry
2026-05-22 20:46:29 -05:00
Xurkon 085a49b15e fix(Arrow): correct Felendren arrow coordinates on Sunstrider
- _ResolveArrowUiMapId: stop redirecting 1241→1941. With zoneDB now
  mapping areaId 3431→uiMapId 1241, and player on uiMapId 1241, keeping
  1241 as 1241 ensures both player and target world coords are computed
  through the same ASCENSION_ZONE_BOUNDS[1241] calibration (1600x1066.67,
  -2721, 8433.94). This gives correct ~169yd distance and bearing.
2026-05-22 19:47:06 -05:00
Xurkon 415b924199 fix(Sunstrider): correct map pins, override check, nil guards
- zoneDB: remap areaId 3431 → uiMapId 1241 (Sunstrider Isle) so quest 8335
  pins render on correct map instead of Eversong Woods (1941)
- compat/HBD: remove 1241→1941 redirect (Sunstrider pins now handled by zoneDB)
- compiler: QuerySingle override check skips empty tables (next() guard) so
  spawn data overrides don't fall through to nil base DB values
- MapIconTooltip: nil guards for minLevel/maxLevel to prevent crashes
- Map/QuestieMap: remove stale 1241→1941 redirect comment
2026-05-22 19:31:47 -05:00
Xurkon 8ab14db3a3 fix(quest): map pins disappear after first kill
AlreadySpawned kept stale entries after UnloadQuestFrames ran.
The draw path for incomplete objectives never cleared it — only
completed objectives called _UnloadAlreadySpawnedIcons. Added
clear at the start of the spawnList draw path so _DetermineIconsToDraw
sees an empty AlreadySpawned and recreates icons each update cycle.
2026-05-21 19:46:17 -05:00
Xurkon afb58e1c2f fix(quest): learned spawns suppressed after quest re-accept
The monster handler replaced spawns with learned data when
prioritizeMyData was enabled but didn't set isLearned=true on
monsterData. The prioritizeMyData filter in PopulateObjective
checked 'if not spawnData.isLearned' and suppressed the spawn,
causing pins to not render after quest abandon+re-accept cycle.
2026-05-21 19:41:03 -05:00
Xurkon 24ed0f48b3 fix(arrow): Sunstrider zoneId 3431, rotation CW, collection distance, native map pins
- zoneId detection: accept 3430 OR 3431 OR uiMapId 1241 (4 locations)
- SetRotation is CW-positive: rotAngle=relative (was -relative)
- Collection functions: override target->1241 when player on Sunstrider
- NPC 15281: spawn zone 1241 (not 3430) for correct coord space
- _ResolveMapUiMapId: removed 1241->1941 redirect
- zoneDB: added areaIdToUiMapId[1241]=1241
- Updated CHANGELOG, README, docs
2026-05-21 19:22:40 -05:00
Xurkon 7f99e7228d fix: clear QuestieDB entity caches on live override injection
QuestieDB:GetNPC and GetObject cache results in _QuestieDB.npcCache /
_QuestieDB.objectCache. When LearnNPC / LearnObject injects new spawn
coordinates into npcDataOverrides / objectDataOverrides, the cached
objects still hold stale (empty) spawn data. PopulateObjective rebuilds
spawnList by calling GetNPC/GetObject, but gets the cached empty data.

Fix: clear the relevant cache entry immediately after live injection so
the next GetNPC/GetObject call rebuilds with fresh override data.

This is the root cause of 'pins not showing on kill' — the spawnList
was rebuilt, but from a stale cache that didn't include the new learned
coordinates.
2026-05-16 09:37:38 -05:00
Xurkon 810ea7f802 fix: real-time minimap pins + defensive GetAchievementNumCriteria shim
1. _InvalidateSpawnListsForNPC was setting objective.AlreadySpawned = nil,
   causing _DetermineIconsToDraw to crash on nil-index when trying to draw
   updated pins. The xpcall wrapper in UpdateObjectiveNotes swallowed the
   error silently, so no icons appeared.

   Fix: unload existing map/minimap icons explicitly, then set
   AlreadySpawned = {} (empty table) instead of nil. Also clear
   hasRegisteredTooltips so tooltips refresh.

2. Added GetAchievementNumCriteria defensive shim for Ascension servers
   with incomplete achievement databases. Returns 0 for invalid IDs
   instead of hard-erroring in Blizzard's WorldMapFrame.
2026-05-16 08:54:52 -05:00
Xurkon d3bcb6da49 fix: empty override tables no longer wipe base DB spawns; real-time pin refresh on NPC learn
Two fixes for QuestieLearner real-time pin rendering:

1. _MergeOverride now skips empty tables (IsEmptyTable guard).
   QuestieLearner stores spawns={} before any coords are captured.
   Previously _MergeOverride treated {} as valid data and replaced the
   base DB's real spawn coordinates with an empty table, breaking pins
   for all NPCs that had been seen but not killed (mouseovers, etc.).

2. _InvalidateSpawnListsForNPC triggers after LearnNPC adds new spawn data.
   The quest objective system caches spawnList once per objective.
   When a kill adds new coordinates, the cached list is stale.
   The new helper:
   - Scans all active quest objectives for references to the NPC
   - Clears objective.spawnList and objective.AlreadySpawned
   - Calls QuestieQuest:UpdateQuest to rebuild pins with fresh data
   This makes learned pins appear in real-time without /reload.
2026-05-16 08:36:47 -05:00
Xurkon 3fff65b66f gitignore: remove Makefile from tracking 2026-05-16 07:59:57 -05:00
Xurkon d0d000cf3f gitignore: re-add dev test files and tooling configs
Tests/, .busted, selene.toml, and wow_classic.yml are dev-only
files — not part of the release artifact.
2026-05-16 07:54:19 -05:00
Xurkon db91ec9fd4 docs: add QuestieLearner in-game testing macros
7 macros for manual in-game testing: stats, target/mouseover dump,
zone info, debug toggle, force learn, and data re-injection.
Each fits within WoW's 255-char macro limit.
2026-05-16 07:33:51 -05:00
Xurkon bf6ecaedbe v1.6.3-unreleased: Sunstrider zone fixes, QuestieLearner icon preservation, migration, and Busted test suite
Code changes (13 files, +916/-171):
- ZoneDB integration: GetZoneId() converts uiMapId→areaId via ZoneDB reverse lookup
- MIN_CONFIDENCE_PINS reduced to 1 for Ascension (incomplete NPC DBs)
- QuestieLearner icon preservation: objective Icon passed to RegisterObjectiveTooltip
- InjectLearnedData zone migration: converts old uiMapId spawn keys to areaId
- areaId passed through all LearnNPC call sites (OnMouseoverUnit, OnQuestDetail,
  OnQuestComplete, OnQuestAccepted, OnQuestTurnedIn, OnGossipShow)
- Compat/Compat.lua: C_Map.GetPlayerMapPosition UiMapData support
- Compat/HBD.lua: Sunstrider mapData aliases and fallback loading
- Sunstrider arrow fix (QuestieArrow.lua), resolved pin rendering (QuestieMap.lua)
- _MergeOverride helper for string/numeric key compatibility
- Northshire Valley UiMapData registration

Testing infrastructure:
- .busted config pointing to tests/ directory
- Tests/wow_api_mock.lua: WoW API mocks (ZoneDB, C_Map, QuestLogCache, etc.)
- Tests/QuestieLearner_spec.lua: 12 tests covering coordinate scaling, spell cast
  learning, zone migration (NPC/objects), icon preservation, settings defaults,
  and LearnNPC spawn zone tracking
- selene.toml + wow_classic.yml: linter configuration

Documentation:
- Makefile with test/lint/ci targets
- sunstrider-coordinate-collection.md: coordinate data reference
- sunstrider-pin-fix.md: root cause analysis and fix documentation
2026-05-16 07:32:47 -05:00
Xurkon 306fb2ac89 Fix learned tooltip quest-start schema in Stormwind 2026-05-13 21:54:09 -05:00
Xurkon a5e3d545a6 Add areaIdToUiMapId[3430]=1241 for Sunstrider Isle reverse mapping 2026-05-10 13:08:26 -05:00
Xurkon 99d090ad2b Remove [946]=668 from UiMapIdOverrides - both Sunstrider and Northshire use 946 as ghost map, cache handles per-zone resolution 2026-05-10 13:03:45 -05:00
Xurkon 151b2ac679 Fix Sunstrider Isle areaId override for GetAreaIdByUiMapId
When UpdateNearestTargets uses ZoneDB:GetAreaIdByUiMapId(946) to verify
player zone, it returns 668 (Northshire) instead of 3430 (Sunstrider).
UiMapIdOverrides[946] was set to 668 for Northshire, so 946 always
resolves to Northshire's areaId even on Sunstrider Isle.

Added direct cache entries for both 1241→3430 and 946→3430 in the
uiMapIdToAreaIdCache (the fast-path lookup table) so GetAreaIdByUiMapId
returns the correct Sunstrider Isle areaId regardless of which map ID
the game returns.
2026-05-10 12:56:45 -05:00
Xurkon b6f4e08880 Revert Tooltip.lua to v1.6.1 (3f8563c) - fixing nameplate icon regression 2026-05-10 10:19:30 -05:00
Xurkon a885faa364 area lookup fixes 2026-05-09 23:53:44 -05:00
Xurkon 9caef46c2b Update docs: MapIconTooltip _GetLevelString guard added to CHANGELOG.md, changelog.html, README.md 2026-05-09 08:26:12 -05:00
Xurkon 01b7f07c41 Fix MapIconTooltip _GetLevelString nil level crash
Root cause: creatureLevels entry for 'Uneasy Citizen' was {} (empty table)
instead of {minLevel, maxLevel, rank}, so creatureLevels[name][1] was nil.
Added early-return guard in _GetLevelString: if creatureLevels[name] is
falsy or has no numeric level at index [1], return name unchanged.

Also updated CHANGELOG.md [Unreleased] section with this fix.
2026-05-09 08:23:54 -05:00
Xurkon 5d56944907 Update version to v1.6.2, document Sunstrider Isle arrow, Tooltip guard, QuestData string safety fixes
[Unreleased] section added to CHANGELOG.md covering:
- Tooltip NPC/Object type guard crash fix (Tooltip.lua)
- InsertMissingQuestIds string guard for questData (tbcQuestFixes.lua, wotlkQuestFixes.lua)
- Sunstrider Isle arrow / UiMapId 946 override fix (zoneDB.lua, QuestieArrow.lua)

README.md:
- Bumped shield to v1.6.2
- Added Sunstrider Isle arrow fix to Quest Arrow section
- Added tooltip crash fix to Tooltips section

docs/changelog.html:
- Added [Unreleased] section at top of changelog

docs/index.html:
- Bumped version badge to v1.6.2
2026-05-09 07:12:37 -05:00
Xurkon 6738027e4d Fix Sunstrider Isle arrow, Tooltip type guard, mapId 946 override
- zoneDB.lua: Add [946] = 3430 to UiMapIdOverrides so GetCurrentZoneId()
  returns 3430 (Sunstrider Isle areaId) even when the game returns uiMapId 946
  (ghost/loading map). Previously 946 had no override, causing zone lookups to
  fall through and return 946 instead of the real zone, breaking arrow distance
  calculation and target filtering.

- QuestieArrow.lua: UpdateNearestTargets uses QuestiePlayer:GetCurrentUiMapId()
  (backed by C_Map.GetBestMapForUnit) for player position. When that returns an
  invalid/ghost map (946/947/0), fall back to ZoneDB lookup via the actual
  zoneId. This ensures the arrow gets real world coordinates regardless of
  whether the world map is open or closed.

  Also includes per-frame debug output when debugArrow profile is enabled.

- Tooltip.lua: Add type guard 'if type(objList) ~= table then break end'
  before iterating learnedNpc[10] and learnedObj[10] in both m_/NPC and o_/object
  paths. Prevents 'attempt to index field questData (a string value)' error
  when the questData field is unexpectedly a string instead of a table.

  The original loop used 'for questId, objList in next, learnedNpc[10]' which
  iterates key-value pairs in insertion order. The _AddToArray helper stores
  values as sequential array elements (tbl[key]=value via table.insert), but
  the iteration was treating it as a questId->objList map. Fixed to use
  ipairs-style iteration with a type check for robustness.
2026-05-09 06:48:59 -05:00
Xurkon 98b4010352 fix: silence QuestLogCache error spam in normal chat
Demote GetQuest/GetQuestObjectives 'quest doesn't exist in QuestLogCache'
messages from Questie:Error to Questie:Debug(DEBUG_DEVELOP). These were
firing repeatedly in chat for quest IDs like 595, 959, 254048 during normal
play. Messages are now only visible when developer debug mode is active.
2026-05-04 21:14:22 -05:00
Xurkon 79e7ee94cc Remove remaining dev files from git and add comprehensive export-ignore
- Remove .claude/skills/hindsight-docs from tracking
- Remove skills/hindsight-docs (hindsight symlink) from tracking
- Add to .gitignore + export-ignore: skills/, scratch/, workflow/, Tests/, Tools/, .claude/skills/
- Add skills/, scratch/, workflow/, Tests/, Tools/, .claude/skills/ to export-ignore
2026-05-04 20:11:52 -05:00
Xurkon eb067e43db docs: add Session 34 Turtle WoW cleanup to changelog 2026-05-04 20:07:38 -05:00
Xurkon 57c790e4ca Remove Turtle WoW TOC, skills-lock, and .luarc.json from tracking
- Remove Questie-X-Turtle.toc (Turtle WoW shut down)
- Remove skills-lock.json (dev lock file)
- Remove .luarc.json (Lua LSP config)
- Add all three to export-ignore in .gitattributes
- Add all three to .gitignore
- Remove Questie-X-TurtleDB from OptionalDeps in Questie-X.toc
2026-05-04 20:05:33 -05:00
Xurkon a0f3a1e020 v1.6.1: Fix map icon completion persistence after objective fulfillment
- SetObjectivesDirty: Add missing loop to reset isUpdated on SpecialObjectives
- PopulateObjective: Add completion guard for objectives without Update fn
- Bump version to 1.6.1 across TOC and changelogs
2026-05-04 19:57:43 -05:00
Xurkon 7d658de3b1 Update install instructions: show AscensionDB/EbonholdDB folder structure alongside WotLKDB 2026-05-03 15:49:37 -05:00
Xurkon ccbe9d0de7 Revert "Session 35: Housekeeping - dependency maintenance and code cleanup"
This reverts commit 3e65cd5a128e2c7d729727e35259e862ed6ef5f3.
2026-05-03 15:37:38 -05:00
Xurkon 6558ffd4a0 Session 35: Housekeeping - dependency maintenance and code cleanup 2026-05-03 15:36:05 -05:00
Xurkon bc14ade192 Changelog: Discord relay housekeeping (Session 35) 2026-05-03 15:23:52 -05:00
Xurkon 6b52b9065b Add LICENSE.md to export-ignore patterns 2026-05-03 15:02:34 -05:00
Xurkon 3320012cf2 Add .claude/ and skills-lock.json to export-ignore 2026-05-03 14:58:35 -05:00