Commit Graph

156 Commits

Author SHA1 Message Date
Xurkon f0327da3e5 fix: use GetQuestLogTitle position 9 for questID in 3.3.5 and add full-log fallback scan 2026-03-16 22:39:39 -05:00
Xurkon f0550fddee feat: add DEBUG_LEARNER and DEBUG_COMMS categories for targeted learner/comms debugging 2026-03-16 22:33:31 -05:00
Xurkon 6b0fdcf9b4 fix: capture Objectives Board quests via gossip cache and trace LearnQuest guards 2026-03-16 22:30:38 -05:00
Xurkon ab60b990e8 fix: WotLKDB stats updated in cached DB path so panel shows counts on every reload 2026-03-16 22:24:40 -05:00
Xurkon 3e18f51551 fix: WotLKDB plugin.stats updated directly in LoadBaseDB so panel shows counts without timing dependency 2026-03-16 22:21:14 -05:00
Xurkon 76854a7fa3 fix: learner only records quest items (class 12) and captures auto-complete quests via QUEST_TURNED_IN 2026-03-16 22:19:09 -05:00
Xurkon fa7974b0d8 fix: mouseover NPC check uses raw npcData instead of GetNPC to prevent CRITICAL spam 2026-03-16 22:14:04 -05:00
Xurkon b2ca8fa660 fix: backfill missing learnedData settings keys from old SavedVariables
EnsureLearnedData was using 'or' which never updates an existing table.
If learnedData was created by an older version of the code without
learnQuests/learnItems/learnObjects keys, those stayed nil (falsy),
causing every quest/item/object learn call to return immediately.

Now explicitly backfills each missing key to true so all categories
record correctly regardless of when the SavedVariables were first created.
2026-03-16 21:56:36 -05:00
Xurkon 003e9698c9 fix: WotLKDB plugin stats + kill tracking improvements 2026-03-16 21:37:26 -05:00
Xurkon 4e5f3ed04b fix: move plugin panel to Database tab + fix WotLKDB 0 counts
- QuestieOptionsDatabase: added 'Loaded Questie-X Plugins' section at order 7
  For pull-type plugins (WotLKDB) where plugin.stats are all 0, the panel now
  falls back to counting QuestieDB.*Data directly — this is safe because the
  name function is called after init completes (user opens the options panel)
- QuestieOptionsAdvanced: replaced full plugin panel with redirect note
  pointing users to the Database tab
2026-03-16 21:27:15 -05:00
Xurkon 893d013110 refactor: reduce QuestieLearner debug noise to signal-only output
- LearnNPC/Quest/Item/Object: only print when entry is brand new (isNew flag)
  Update calls (coord refresh, mc increment) are silent
- Remove mouseover cache log (fired on every quest giver hover)
- Remove target cache log (fired on every target switch)
- Remove network MERGE log (fired every 60s reinforcement cycle)
- Remove network NEW log (replaced by the isNew pattern above)
- Kill log kept but wording tightened to 'Kill recorded'
- Inject summary, Events registered, Initialized kept at DEBUG_INFO
  (only visible when INFO level is enabled, not default DEVELOP spam)
2026-03-16 21:24:42 -05:00
Xurkon a3eaba30fd fix: WotLKDB plugin stats + kill tracking improvements
QuestieInit:LoadBaseDB:
- Count WotLKDB records BEFORE clearing globals
- Store counts in QuestieX_WotLKDB_Counts global for Loader.lua to read

QuestieLearner:OnCombatLogEvent:
- Only record kill coords for NPCs already in QuestieDB (quest objectives)
  or that were explicitly cached via target/mouseover (known quest givers)
- Prevents every random mob kill from polluting the learner database
2026-03-16 20:52:25 -05:00
Xurkon 8bc74a488b feat: QuestieLearner comprehensive overhaul v1.2.6
- Full quest field capture (title, level, objectives, description, money, zone)
- Mouseover filter: only record NPCs with QUESTGIVER npcFlag (0x02) or known DB entries
- OnTargetChanged: cache GUID for kill tracking only, no more spurious LearnNPC calls
- Grid-bucket coordinate clustering (COORD_GRID=2.0) replaces naive radius dedup
- Object recording: detect GameObject loot, gossip, and quest giver/finisher
- Item loot: async GetItemInfo retry via GET_ITEM_INFO_RECEIVED event
- LearnQuestGiver: entityType parameter (1=NPC,2=obj,3=item) for correct wiki layout
- InjectLearnedData: uses grid clustering in all merge paths
- MergeImport: calls InjectLearnedData immediately after merge (live override injection)
- README: corrected import reload requirement description
- CHANGELOG + docs/changelog.html updated with developer detail
2026-03-16 20:49:02 -05:00
Xurkon 4db9737a35 chore: stage all pending changes (DB cleanup, corrections, compiler, init, plugin API) 2026-03-16 19:41:52 -05:00
Xurkon 457420f90c feat: add Database options tab with import/export/cleanup
New files:
- Modules/QuestieLearnerExport.lua: serialize/compress/encode pipeline using
  AceSerializer + LibDeflate:CompressDeflate(level=9) + EncodeForPrint.
  QxLD:<version>!<encoded> string format. Export(), ExportAll(), ValidateImport(),
  MergeImport(), DryRunPrune(), Prune().
- Modules/Options/DatabaseTab/QuestieOptionsDatabase.lua: new Database tab with:
    - Live learned data stats (per server)
    - Per-type learner toggles (NPCs/Quests/Objects/Items/Broadcast)
    - Export current server / Export all servers buttons (opens scrollable dialog)
    - Import window (paste -> Validate -> Import with diff summary)
    - Dry-run preview and Prune Now cleanup buttons
    - Full reset button (confirm-gated)
    - Contribute section with step-by-step GitHub submission instructions

Wiring:
- QuestieOptions.lua: database_tab initialized and registered in args
- All TOC files: QuestieLearnerExport.lua added before options, DatabaseTab lua added
2026-03-15 19:48:45 -05:00
Xurkon d2861d194b feat: expand QuestieLearner and QuestieLearnerComms
QuestieLearner:
- Expose QuestieLearner.data as direct ref to Questie.db.global.learnedData
- Add mc (match-count) field tracking to LearnNPC/Quest/Item/Object
- Add _Learner:BroadcastIfCommsAvailable() hook called after every write
- Add QuestieLearner:HandleNetworkData() — validates, merges, and deduplicates
  incoming network data for NPC/QUEST/ITEM/OBJECT types, including coordinate
  and item-drop list merging

QuestieLearnerComms:
- Move DebugLog definition to top of file (was called before definition)
- Fix IsDuplicateMessage fallback: table.getn(serializedData) -> string.len(),
  mod() -> math.mod() for Lua 5.0 compatibility
- Add mutedUntil table and implement 5-minute timed mute on 3 strikes
  (previously the 3-strike branch was an empty if body with no effect)
- Remove duplicated nil-check + DebugLog block in ProcessRawMessage
2026-03-15 19:10:35 -05:00
Xurkon a89dbddb58 fix: add XXH load to TBC toc and guard plugin.stats nil access 2026-03-15 19:07:43 -05:00
Xurkon 984b9f9a68 fix: correct select() polyfill in QuestieLoader to not use arg table
The previous implementation used 'arg' (Lua 5.0 implicit vararg table) which
is nil inside a fixed-parameter function. Replace with the explicit index-chain
pattern matching the QuestieCompat.lua version.
2026-03-15 19:04:01 -05:00
Xurkon b8594c9782 fix(p2): restore plugin status UI, C_QuestLog/C_Map shims, QuestieServer init
- QuestieOptionsAdvanced.lua: restore compat_header, plugin_header, plugin_status_desc
  blocks showing loaded Questie-X plugins with stats in the Advanced options tab
- QuestieCompat.lua: add C_QuestLog shim (GetNumQuestLogEntries, GetQuestLogTitle,
  GetAllQuestIDs, GetQuestObjectives, IsQuestFlaggedCompleted, GetQuestPlayerQuestLink),
  C_Map shim (GetPlayerMapPosition, GetBestMapForUnit, GetMapInfo),
  GetTrackedAchievements, IsAchievementCompleted, and LibUIDropDownMenu shims
- QuestieInit.lua: import QuestieServer module, add QuestieServer:Init() call with nil
  guard, wrap HBDHooks:Init() in nil guard
2026-03-15 18:33:41 -05:00
Xurkon d5a0db953d Fix: MinimapIcon initialization crash due to nil GetIcon method 2026-03-15 18:28:58 -05:00
Xurkon 17fa3932f2 UI: Rebrand minimap tooltip to Questie-X and update associated localizations 2026-03-15 18:23:25 -05:00
Xurkon f859e46881 feat: add mmapIcon.tga as minimap button with circular mask for all clients
- Icons/mmapIcon.tga: new minimap button icon
- MinimapIcon.lua: use mmapIcon.tga as LDB icon; apply circular mask
  (AddMaskTexture for Retail, SetMask+pcall for Classic/WotLK/1.12 vanilla)
2026-03-15 18:17:43 -05:00
Xurkon 6d3189b608 fix(p1): restore Lua 5.0 polyfills, hooksecurefunc, C_Timer, LibDeflate, and XXH load lines
- QuestieLoader.lua: add table.getn, math.mod, string.match, string.gmatch, select polyfills
- QuestieCompat.lua: add string.match, select, math.mod shims; hooksecurefunc polyfill;
  full C_Timer polyfill; fix Is335 to use do/end block safe for Lua 5.0
- embeds.xml: add LibDeflate lib.xml include
- Questie-X.toc, Questie-X-Classic.toc, Questie-X-Turtle.toc: add XXH_Lua_Lib load line
2026-03-15 17:50:50 -05:00
Xurkon 5582f310eb chore: update Credits tab logo and changelog for v1.1.4 2026-03-15 17:46:43 -05:00
Xurkon 20d0b8fe98 Fix Credits tab logo by converting to TGA and updating path 2026-03-15 08:20:00 -05:00
Xurkon b5dadb3089 Add Questie-X logo to Credits tab 2026-03-15 08:13:58 -05:00
Xurkon fcec22881f Rebrand to Questie-X and add Credits tab 2026-03-15 08:08:08 -05:00
Xurkon c4d003e58f feat: Questie-X v1.1.4 - plugin architecture, monorepo, rebranding
- Repoint remote to Xurkon/Questie-X
- Add QuestiePluginAPI, QuestieServer, QuestieLearnerComms modules
- Add Questie-X.toc, Questie-X-Classic.toc, Questie-X-TBC.toc, Questie-X-Turtle.toc
- Remove embedded Database/Ascension and Database/Ebonhold (migrated to plugins)
- Add Plugins/ directory with NTFS junctions for Questie-X-AscensionDB and Questie-X-EbonholdDB
- Add LibDeflate, XXH_Lua_Lib, LibDBIcon-1.0, LibDataBroker-1.1
- Update README: Questie-X branding, logo, plugin install guide, plugin API docs
- Update CHANGELOG: v1.1.4 entry documenting all architectural changes
- Update .gitignore: exclude plugin junctions, __pycache__, .agents, debug files
- Various module updates: corrections, map, tracker, tooltips, quest, options
2026-03-14 06:10:17 -05:00
Xurkon a97c1daa2f Fix: loot bot item tracking - debounce BAG_UPDATE_DELAYED with follow-up scan 2026-03-04 16:31:33 -06:00
Xurkon 0055f84d11 Bump version to 9.9.0 and add Custom Ebonhold Quests 2026-03-04 06:45:02 -06: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 8616765eed Update custom DB quests and bump version to 9.8.5 2026-02-24 20:52:12 -06:00
Xurkon ba6ef7e2df Fix: Add nil checks to QuestiePlayer:Initialize to prevent arithmetic errors on custom servers 2026-02-24 16:40:05 -06:00
Xurkon 7c99ce2a79 Fix: Resolve nil pairs error in Townsfolk initialization on custom servers 2026-02-24 16:10:01 -06:00
Xurkon 26bdefb46e Fix: Add missing QuestiePlayer import in QuestEventHandler, update docs, version 9.8.4 2026-02-22 13:08:41 -06:00
Xurkon ee3e06da90 Release v9.8.0: Lootbot Tracker & Map Pins Fixes 2026-02-22 01:07:31 -06:00
Xurkon 5bee40b953 chore: release v9.7.12
- Fixed missing Finisher frame pool reset
- Fixed tracker force-complete race condition on custom quests
2026-02-22 00:09:21 -06:00
Xurkon 94ed16d7f0 Release v9.7.11 2026-02-21 23:42:42 -06:00
Xurkon c42945a1f8 Release v9.7.10 2026-02-21 22:52:51 -06:00
Xurkon 52c13b98aa Add debug print to Arrow to see evaluation values 2026-02-21 12:46:19 -06:00
Xurkon 7aaf4d3495 Fix Arrow failing to detect quest completion fallback
When QuestLogCache parses incomplete tracker data upon reload,
it leaves quest.isComplete undefined or false. This allows the
Arrow to process SpecialObjectives (like required source item drops)
which do not have Completed/Needed/Collected stats on them, bypassing
our recent arrow logic fix.

Added an explicit check for QuestieDB.IsComplete(quest.Id) == 1
at the very top of the track loop to guarantee the Arrow immediately
stops processing objectives and exclusively targets the finisher.
2026-02-21 12:32:36 -06:00
Xurkon 1248d7a1f6 Fix Arrow pointing to completed objectives instead of finisher
QuestieArrow._CollectObjective was only checking objective.Completed
to determine if it should skip an objective. In WotLK, the server often
doesn't send the completed flag until turn-in time.

This caused the arrow to still pick up the kill/interaction spawns (like
the 5/5 Goblin Prisoners) because their Completed flag hadn't been
set, overpowering the finisher spawn.

Added a fallback check: if objective.Collected >= objective.Needed,
skip the objective.
2026-02-21 12:07:07 -06:00
Xurkon 6d86a784e7 Set quest.isComplete when IsComplete==1 in GetAllQuestIds
QuestieArrow._CollectQuestTargets checks quest.isComplete (the quest
object field) to decide whether to collect finisher spawns or objective
spawns. Without setting this field, the arrow fell through to objective
collection and picked up the stale Cold Iron Key fake objective
(CheckQuestSourceItem) which resolves to NPC 29323 at 39.8, 72.7.

Now when QuestieDB.IsComplete returns 1, set quest.isComplete = true
and quest.WasComplete = true before PopulateObjectiveNotes, so the
arrow correctly routes to the finisher (Gretchen Fizzlespark) instead.
2026-02-21 11:59:34 -06:00
Xurkon e6c9d241fb Fix tooltip error for zone-complete trigger objectives (quest 50150)
_RegisterObjectiveTooltips was only silently skipping objectives
with Type == 'event'. Quest 50150 'Storm Peak Orders' uses a
server-tracked zone-completion trigger objective which has no spawnList
and no Id -- the server sends it with a type like 'monster' not 'event'.

Broaden the guard: any objective with no spawnList AND no Id has nothing
for Questie to draw. Mark hasRegisteredTooltips = true and return
silently. Objectives with no spawnList but a valid Id still error
so missing data is reported.
2026-02-21 11:42:26 -06:00
Xurkon ec013e2861 Demote cache count mismatch from Error to Debug
When isQuestLogGood passes, the cache IS valid. The goodQuestsCount != numQuests
mismatch is a false positive on WotLK private servers where GetNumQuestLogEntries
returns a different numQuests than what the objectives loop validated.
Log at debug level so it doesn't spam player chat.
2026-02-21 11:29:02 -06:00
Xurkon 211bc5be84 Fix arrow pointing to key-drop NPC after quest complete
GetAllQuestIds called CheckQuestSourceItem(questId, true) for all
non-failed quests. When a consumable key is used and leaves the bag,
this created a fake 'get the item' objective pointing to the drop NPC
even when the quest was already complete (complete == 1).

Guard the call: only run CheckQuestSourceItem when complete != 1.
Complete quests route through PopulateObjectiveNotes which correctly
shows the finisher instead.
2026-02-21 11:17:37 -06:00
Xurkon 6600e57d30 Restore visible error for non-event objectives missing spawnList
Event-type objectives (triggerEnd with no coordinates) silently skip.
All other objective types with missing spawnList keep Questie:Error
so players can see and report missing spawn data.
2026-02-21 11:10:15 -06:00
Xurkon db1d8363c4 Fix false-positive 'broken quest log' error on WotLK servers
GetQuestObjectives returns nil for quests with no trackable objectives
on WotLK private servers. The original code set hasInvalidObjective=true
but left isQuestLogGood=true, causing goodQuestsCount to stay 0 while
numQuests was 19 -> 'Good quest: 0/19' error on every login/reload.

Treat a non-table return as an empty valid objective list. Demote the
Questie:Error to Questie:Debug so it doesn't spam chat.
2026-02-21 11:07:05 -06:00
Xurkon cfeee769e8 Release v9.7.9
Register BAG_UPDATE_DELAYED to catch autoloot objective updates.
Autoloot bots that bypass the loot frame skip QUEST_WATCH_UPDATE,
leaving the tracker stuck at a stale count. Setting doFullQuestLogScan=true
on BAG_UPDATE_DELAYED forces a refresh on the next QUEST_LOG_UPDATE.
2026-02-21 10:44:26 -06:00
Xurkon 052d38c2f7 Fix tooltip objective population error for event-type objectives with no spawnList
_RegisterObjectiveTooltips: silently return for Type='event' objectives
with no spawnList (e.g. triggerEnd with nil coordinates). These have no
tooltip to register, so mark hasRegisteredTooltips=true and bail out.
For other types, demote from Error to Debug.
2026-02-21 10:35:23 -06:00