Commit Graph

22 Commits

Author SHA1 Message Date
Narcasung 30fe4b83a9 fix(tracker): name and group quests built from partial records
Quests assembled from a Learner entry or a questDataOverrides entry that
never captured every field reach the tracker with nil fields, since GetQuest
copies rawdata key by key. Two of those show: a nil name printed as the
quest id, and a nil zoneOrSort that sent _GetZoneName down its very first
line, `if not zoneOrSort then return "Unknown Zone" end`, before it could
consult the quest log header the earlier fix added. Those objects are cached
for the session, so neither repaired itself.

GetQuest now fills a missing name from the quest log and defaults zoneOrSort
to 0, the value every caller already reads as "no zone on file" -- and which
some of them require, `quest.zoneOrSort > 0` erroring outright on nil.
_GetZoneName treats nil the same way rather than short-circuiting, which
also stops a nil quest from labelling its group Unknown Zone under the sort
modes that do not group by zone at all.

The tracker asks the quest log for a title before printing an id, so quests
already cached without a name come out right too, and the live-fallback
builder stops discarding the override data it just looked up.
2026-08-17 15:57:17 +02:00
Narcasung 26a135a2ca fix(tracker): show and update objectives on quests missing from the DB
Quests with no QuestieDB entry get a fallback object built from the quest
log, and three things were wrong with it.

Its objectives carried the leaderboard line in a `text` field, but the
tracker's objective loop skips any objective without a `Description`, so
those quests drew a title and nothing under it. Split the line into a
description and its counts instead, and set the same `Index`/`Completed`
fields a DB objective carries.

The object was then cached for the session and only rebuilt when it had no
zone info, so its counts stayed at whatever the log said when the quest was
first seen. `IsComplete` had the same problem one level down: it closed over
the completion flag read at build time, so the quest never went (Complete).
Both now re-read the log on every draw, in place, so the objective tables
the drawn lines hold stay valid.

Refreshing per draw needs the quest's log index, so the walk that already
builds the header map records it too.
2026-08-17 14:11:49 +02:00
Narcasung de270a0e8e fix(tracker): drop quests the player no longer has
Ascension's special quests are finished by the server the moment their
objectives are met, and one of them stayed in the tracker for the rest of
the session: currentQuestlog is only as good as the removal events that
maintain it, and nothing landed for that quest.

The tracker now checks the quest log itself, which it already walks once
per draw for the zone headers, and skips anything that is no longer in
it, dropping the fallback object built for it as well. Skipped rather
than pruned, so a redraw that catches the log mid-refresh does not throw
away state Questie is about to want back.

Three things on the event side that let it get that far:

- CleanupRemovedQuestsFallback now also runs after a full quest log scan.
  UpdateAllQuests only inspects quests still in the log, so for as long
  as something kept asking for full scans, nothing looked for removals.
- A removed quest counts as completed when the server has it flagged
  complete. QuestieDB.IsComplete cannot answer for a quest the database
  has never heard of, so these were filed as abandoned instead.
- The removal scan type-checks the quest id before comparing it, so a
  stray string key cannot error out the pass for every other quest.
2026-07-30 18:26:42 +02:00
Narcasung 706fc0b8ad fix(tracker): group quests under their quest log header for server categories
Ascension files its main quest chain under a header of its own,
"Ascension Main Quest", which exists in no zone table. The tracker fell
back to the quest's zoneOrSort, and for anything the Learner recorded
that is the zone the quest was picked up in -- so the whole chain showed
up under "Red Cloud Mesa".

A header that resolves to no area is a category the server invented, and
the client's own grouping is the only thing that knows about it, so use
it. Headers are now mapped in a single pass per draw instead of a walk of
the quest log per quest.
2026-07-30 18:15:10 +02:00
Narcasung 0103932b9b fix(tracker): make the objective marker button usable at larger sizes
The button shared the quest gutter with the collapse button, the quest
item buttons and the zone header text, so anything past the default size
was clipped by the tracker edge or drawn on top of its neighbours.

Give it a gutter of its own instead. GetSuperTrackMarginReserve feeds
questMarginLeft, which every layout and width calculation already builds
on, and the quest item buttons and zone labels are shifted by the same
amount. The button then anchors flush left of the line and the tracker
widens to match, so nothing overlaps at any size. Raise the size cap to
70 now that it fits, and drop the hover tooltip.

Also stop relying on the SetSuperTrackedQuestID hook as the only source
of truth. It never fires while the player is a ghost -- the corpse arrow
takes over the marker -- and it has not fired yet on a login or reload,
which left the tracker with no idea what was tracked in both cases. The
client is now asked directly: the watch frame POI buttons flag their own
selection, the map pins say it through their art (the selected variant
sits half a texture above the normal one), and the quest log selection
answers for the login window when no pin is styled yet. Selection calls
are hooked for the same reason, so clicks repaint while dead, and the
requests are coalesced because callers select a quest log entry and
restore the previous one a line later.
2026-07-25 16:19:56 +02:00
Narcasung 6aafd2c112 feat(tracker): add objective marker button to quest lines
Ascension's client backports retail's floating objective marker. This adds
a button to each tracker quest line that points the marker at that quest,
mirroring the quest pin the world map draws for it.

Supertracking is a slave of the map's quest selection: both the map and the
Blizzard watch frame funnel through SelectQuestLogEntry, and calling
C_SuperTrack.SetSuperTrackedQuestID directly only moves the marker until the
next map interaction stomps it. So the button clicks the same POI frame the
client clicks -- the watch frame button when one exists, otherwise the map's
quest frame.

The client dropped GetSuperTrackedQuestID, so the current quest is read by
hooking SetSuperTrackedQuestID instead. Every path ends up there, including
the automatic re-pick on zone change, so the highlight cannot fall out of
sync with tracking changed outside the addon. Caching what we last set would
have gone stale the moment the player used the map.

The button mirrors the pin's own textures rather than picking atlas cells, so
the digit, the "?" completed quests use and the selected variant all follow
whatever the client draws. Quests with no pin get no button, and the map's
POI frames are built on demand so buttons appear without opening the map.

Adds trackerShowSuperTrackButton and trackerSuperTrackButtonSize.
2026-07-25 01:50:03 +02:00
Narcasung 9da949dd66 feat(tracker): add "By Zone + % Complete" sort options
Groups quests by zone with headers, then orders each zone's quests by
completion percent (completes on top / bottom in the reversed variant).
2026-07-19 17:22:53 +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
Xurkon 69a9a4a7a3 fix(tracker): guard VoiceOver questPlayButtons and AceGUI tree tooltip (#15)
Two crashes reported in #15 on Elune (1.6.3):

- TrackerUtils:IsVoiceOverLoaded only verified the VoiceOver addons were
  loaded, not that VoiceOver.QuestOverlayUI.questPlayButtons exists. Some
  VoiceOver builds expose a QuestOverlayUI without that table, so
  UpdateVoiceOverPlayButtons and SetAllPlayButtonAlpha crashed with
  'attempt to index field questPlayButtons (a nil value)'. Now verified in
  IsVoiceOverLoaded, which all play-button call sites gate on.

- AceGUIContainer-TreeGroup crashed indexing a nil AceGUI.tooltip when a
  conflicting addon registered a broken AceGUI-3.0 core (version 1.#INF)
  that won LibStub but never created the shared tooltip frame. The tree
  button handlers now lazily recreate it; widget version bumped 47->48 so
  the fixed widget wins registration.
2026-06-09 20:41:37 -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 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 5fb621a53a v1.5.3: Add dedicated Keybinds tab 2026-03-29 03:01:14 -05:00
Xurkon e6c27ddf77 feat: add Use Quest Item keybind + fix custom zone names + nil check 2026-03-28 22:33:54 -05:00
Xurkon 59c33e9f9c feat: standardize v1.5.0 and consolidate stability fixes 2026-03-28 11:08:32 -05:00
Xurkon b0f8ba22e7 feat: release v1.3.0 - QuestieLearner Confidence & Tiered Pruning Engine 2026-03-17 22:33:01 -05:00
Xurkon 7f16d31294 docs: add v1.2.9 changelog — cross-link engine, zone fix, untrack fix 2026-03-17 17:38:43 -05:00
Xurkon 35f2d49b6c fix: patch IsComplete method onto QuestLogCache fallback objects in currentQuestlog so QuestieMap doesn't crash 2026-03-16 23:08:38 -05:00
Xurkon a7a66810be fix: store fallback quests in TrackerUtils._fallbackQuests not currentQuestlog to prevent arrow/quest module crashes 2026-03-16 23:05:58 -05:00
Xurkon ef62d1b2b2 fix: guard IsQuestFlaggedCompleted nil on WotLK 3.3.5 in fallback quest IsComplete 2026-03-16 22:58:43 -05:00
Xurkon d9828e6159 fix: resolve QUEST_ACCEPTED log-index vs questID ambiguity and add quest-log fallback to tracker for DB-unknown quests 2026-03-16 22:57:18 -05:00
Xurkon b13833935a v9.8.9: Badlands Trophy quest, 7:XT NPC data, fix AreaId CRITICAL spam 2026-03-02 21:11:30 -06:00
Xurkon 6ef85d4e2d v9.7.2: Ebonhold Database integration and core logic refinements 2026-02-14 21:13:44 -06:00