Skip to content

Commit f1e09b4

Browse files
cscoder69claude
andcommitted
Detection: the mob's own tooltip wins over the game's "not related"; /cqi why
- WoW Forever answers "not related" for some drop mobs whose tooltip lists our open objective (Strider young, "0/5 Carne de Moa"): the tooltip data now wins, and when the quest lines are only in the drawn tooltip a hidden scanner reads them (cached per mob GUID until the log changes). - /cqi why: prints what detection sees on the target (game answer, tooltip data, drawn lines, result). - Notes: the CurseForge app deletes files through the dev junction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b5c875e commit f1e09b4

3 files changed

Lines changed: 84 additions & 3 deletions

File tree

‎CLAUDE.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ live in game after `/reload`. Second dev PC (notebook, set up 2026-11-11): sourc
151151
reads `QuestieTooltips.lookupByKey["m_"..npcId / "o_"..objectId]` (unfinished objectives of quests
152152
in our log, count from `Collected/Needed`). Asked only where the game leaves a gap: the game says
153153
related but the tooltip shows nothing open (after the quest-log name lookup), and the no-API /
154-
no-tooltip fallbacks. A "no" from the game is never overruled. Only when Questie is LOADED (the
154+
no-tooltip fallbacks. A "no" from the game is never overruled by Questie or the quest log — but the
155+
mob's OWN tooltip listing one of our open objectives always wins (Forever says "not related" for
156+
some drop mobs, e.g. the user's Strider young with "0/5 Carne de Moa", 2026-11-11). Only when Questie is LOADED (the
155157
user has it installed but disabled on their main character). Everything pcall'd; mock covers
156158
disabled / loaded / game's no / broken Questie.
157159
- **Hide while fighting it** (`hideWhileFighting`, OFF by default, user's request 2026-11-11): in
@@ -200,6 +202,9 @@ Settings) — the legacy fallbacks (IsAddOnLoaded, GetAddOnMetadata, GetQuestLog
200202
GetNumQuestLogEntries, InterfaceOptions_AddCategory) were removed. Globals written: only
201203
`CSCoderQuestIndicatorDB`, `SLASH_CSCODERQUESTINDICATOR1`, `CSCoderOptionsParent` (shared on purpose)
202204
and frames named `CSCoder_QuestIndicator*`. Check with `luajit -bl <file> | grep GSET`.
205+
Posted by the user (by hand) on **r/wowaddons** and **r/WowUI** on 2026-11-11 (v1.2.6), with the
206+
4 screenshots and the AI Disclaimer. Claude can't post: no Reddit access here, and Claude in Chrome
207+
has Reddit on its blocked list. Post text kept in the Desktop folder "CurseForge - galeria".
203208

204209
## Local checks (run before every hand-off)
205210
LuaJIT (Lua 5.1, same as WoW) is installed: `C:\Users\Claudio\AppData\Local\Programs\LuaJIT\bin\luajit.exe`.
@@ -254,6 +259,10 @@ whether the mock is missing an API (e.g. it once returned nil for `GetHighlightT
254259
- 1.2.6 (2026-11-11): modern APIs only (deprecated fallbacks removed for the Reddit code audit);
255260
README badges/screenshots, new CurseForge page. The CurseForge app had replaced the dev junction
256261
with its v1.2.5 copy after a power cut: keep this addon unmanaged in the app on dev PCs.
262+
**Worse (found 2026-11-11):** when the app updates or uninstalls the addon it deletes files THROUGH
263+
the junction, i.e. in the source folder (the icons folder vanished twice; the first time was blamed
264+
on the power cut). The user removed the addon from the CurseForge app on this PC. If it happens
265+
again: `git checkout -- icons` and recreate the junction.
257266

258267
## Quest pickup / Gameplay tab (released in v1.2.5; turn-in confirmed in game, button position not yet)
259268
- Third tab **Gameplay** (Settings | Gameplay | Profiles; built inline in the `builders` list —

‎CSCoder_QuestIndicator.lua‎

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ local objectiveTexts = {} -- { text = lower case objective, kind = quest kind }
373373
-- What the last quest log scan found: unfinished objectives per quest (the minimap tooltip
374374
-- summary) and when an objective last finished (icons that stop being needed right after show
375375
-- the check mark).
376-
local questLog = { summary = {}, completedAt = -100, byName = {} }
376+
-- scanned: per mob GUID, what the drawn tooltip showed (see IsQuestMob), until the log changes.
377+
local questLog = { summary = {}, completedAt = -100, byName = {}, scanned = {} }
377378

378379
-- A name found in an unfinished objective ("Kobold Vermin slain: 3/10", "Crate of Supplies:
379380
-- 1/4"): its quest kind and progress.
@@ -475,10 +476,31 @@ local function IsQuestMob(unit)
475476
if ok then related = value end
476477
end
477478
if Hidden.Value(related) then return Hidden.UNKNOWN end
478-
if related == false then return false end
479479
local state, title, progress = ByTooltipInfo(unit)
480480
if state == Hidden.UNKNOWN then return Hidden.UNKNOWN end
481+
-- The tooltip lists one of OUR open objectives: marked, whatever the API says. WoW Forever
482+
-- answers "not related" for some mobs whose quest item is a drop (user's Strider young with
483+
-- "Moa a quem moer - 0/5 Carne de Moa" in its tooltip, 2026-11-11), so the tooltip wins.
481484
if state == true then return questLog.FromTitle(title, progress) end
485+
if related == false then
486+
-- On WoW Forever some mobs' quest lines are only in the DRAWN tooltip, not in its data
487+
-- (the user's Strider young: "Moa a quem moer - 0/5 Carne de Moa" on screen, no icon).
488+
-- Read a hidden drawn tooltip too, once per mob until the quest log changes (cheap).
489+
if state == nil then
490+
local guid = UnitGUID and UnitGUID(unit)
491+
if Hidden.Value(guid) or type(guid) ~= "string" then guid = nil end
492+
local cached = guid and questLog.scanned[guid]
493+
if cached == nil then
494+
local scanned, scannedTitle, scannedProgress = ByTooltipScan(unit)
495+
if scanned == Hidden.UNKNOWN then return Hidden.UNKNOWN end
496+
cached = scanned and { scannedTitle, scannedProgress } or false
497+
if guid then questLog.scanned[guid] = cached end
498+
end
499+
if cached then return questLog.FromTitle(cached[1], cached[2]) end
500+
end
501+
-- Otherwise the game's "no" stands: nothing else (quest log names, Questie) overrules it.
502+
return false
503+
end
482504
if related then
483505
-- The tooltip shows nothing open, yet the game says the mob still matters: another quest
484506
-- needs it without showing in the tooltip (often a drop). Its name in an unfinished
@@ -936,6 +958,7 @@ end
936958
function RebuildObjectiveTexts()
937959
wipe(objectiveTexts)
938960
wipe(questLog.byName)
961+
wipe(questLog.scanned)
939962
if not (C_QuestLog and C_QuestLog.GetQuestObjectives) then return end
940963
-- An objective that was unfinished on the last scan and is finished now plays the sound
941964
-- (once per scan); a quest whose last objective just finished is announced as ready.
@@ -3701,6 +3724,33 @@ SlashCmdList.CSCODERQUESTINDICATOR = function(msg)
37013724
ShowNews()
37023725
elseif cmd == "debug" then
37033726
ShowDebug()
3727+
elseif cmd == "why" then
3728+
-- What the detection sees on the target: the game's answer, the tooltip data lines, the
3729+
-- drawn tooltip lines, and the result. For bug reports ("this mob has a quest, no icon").
3730+
local function Out(text) print("|cffffd200" .. TITLE .. "|r " .. text) end
3731+
if not UnitExists("target") then Out("target a mob first, then /cqi why") return end
3732+
local ok, related = pcall(C_QuestLog.UnitIsRelatedToActiveQuest, "target")
3733+
Out("related to a quest (game): " .. tostring(ok and related))
3734+
local data = C_TooltipInfo and C_TooltipInfo.GetUnit and C_TooltipInfo.GetUnit("target")
3735+
if Hidden.Table(data) and Hidden.Table(data.lines) then
3736+
for i, line in ipairs(data.lines) do
3737+
if Hidden.Table(line) then
3738+
Out(string.format("data %d: type %s, %s%s", i, tostring(line.type), tostring(line.leftText),
3739+
line.completed ~= nil and (" (completed " .. tostring(line.completed) .. ")") or ""))
3740+
else
3741+
Out("data " .. i .. ": hidden by the game")
3742+
end
3743+
end
3744+
else
3745+
Out("tooltip data: none or hidden")
3746+
end
3747+
scanner:SetOwner(WorldFrame, "ANCHOR_NONE"); scanner:ClearLines(); scanner:SetUnit("target")
3748+
for i = 2, scanner:NumLines() do
3749+
local fs = _G[ADDON .. "ScannerTextLeft" .. i]
3750+
Out("drawn " .. i .. ": " .. tostring(fs and fs:GetText()))
3751+
end
3752+
local needed, kind, progress = IsQuestMob("target")
3753+
Out(string.format("result: needed %s, kind %s, progress %s", tostring(needed), tostring(kind), tostring(progress)))
37043754
elseif cmd == "plate" then
37053755
-- Measures the target's nameplate for the preview and prints what was found.
37063756
-- Protected: an error here would leave the text stuck in the chat box.

‎tools/wowmock.lua‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,28 @@ do
337337
env.C_QuestLog.UnitIsRelatedToActiveQuest = function() return false end
338338
local shownNo = PlateCount()
339339
print("questie: game's no wins", not shownNo)
340+
-- The game says "not related" but the tooltip lists our open objective (a drop: the user's
341+
-- Strider young, "0/5 Carne de Moa"): the tooltip wins, the mob is marked with its count.
342+
local savedTooltip = env.C_TooltipInfo
343+
env.C_TooltipInfo = { GetUnit = function()
344+
return { lines = { { type = 17, leftText = "Quest B" }, { type = 8, leftText = "Moa Meat: 0/5", completed = false } } }
345+
end }
346+
local shownDrop, countDrop = PlateCount()
347+
print("quest: API says no, tooltip shows an open objective -> marked", shownDrop and countDrop)
348+
-- Same, but the quest lines are only in the DRAWN tooltip, not in its data (what the user's
349+
-- Strider young does in game): the hidden scanner tooltip finds them.
350+
env.C_TooltipInfo = { GetUnit = function() return { lines = { { type = 0, leftText = "Strider young" } } } end }
351+
local scannerFrame = rawget(env, "CSCoder_QuestIndicatorScanner")
352+
local drawn = { "Level 13 Beast", "Quest B", " - Moa Meat: 0/5" }
353+
rawset(scannerFrame, "NumLines", function() return #drawn + 1 end)
354+
-- (the addon looks them up through _G, which in this mock is the real global table)
355+
for i, text in ipairs(drawn) do _G["CSCoder_QuestIndicatorScannerTextLeft" .. (i + 1)] = { GetText = function() return text end } end
356+
try("drawn-only log", eventFrame._scripts.OnEvent, eventFrame, "QUEST_LOG_UPDATE")
357+
local shownDrawn, countDrawn = PlateCount()
358+
print("quest: API says no, quest only in the drawn tooltip -> marked", shownDrawn and countDrawn)
359+
rawset(scannerFrame, "NumLines", nil)
360+
for i = 2, #drawn + 1 do _G["CSCoder_QuestIndicatorScannerTextLeft" .. i] = nil end
361+
env.C_TooltipInfo = savedTooltip
340362
env.C_QuestLog.UnitIsRelatedToActiveQuest = function() return true end
341363
-- A broken Questie (odd entries, an Update that errors) must not break anything.
342364
fakeQuestie.lookupByKey.m_123 = { odd = "text", ["202 1"] = { questId = 202, objective = {

0 commit comments

Comments
 (0)