Skip to content

Commit f1dd0d6

Browse files
cscoder69claude
andcommitted
Two quests, one mob: mark the mob whenever the game says it still matters, even without a count
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8486c9c commit f1dd0d6

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## v1.2.3
44

5-
- **Fix:** a mob needed by two quests kept no icon once one quest was done (for example 3/3 done, the other still at 2/8). It now shows, with the count of the quest that still needs it.
5+
- **Fix:** a mob needed by two quests kept no icon once one quest was done (for example 3/3 done, the other still at 2/8). It is marked again, with the count of the quest that still needs it when that quest names the mob.
66
- **Report a bug** button in the options window, with the link to the issues page.
77
- **/cqi debug**: a short report to copy (versions, client, language, main settings, place, other nameplate and quest addons, the addon's last errors), ready to paste in a bug report.
88
- Every release is now checked automatically before it is published.

‎CLAUDE.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ live in game after `/reload`.
142142
(issues URL), both in the copy window (`OpenShareWindow("copy", title, hint, text)`). Errors that
143143
mention the addon are kept in `root.lastErrors` (last 10) by a wrapper around the current error
144144
handler, which still receives every error.
145+
- **Two quests, one mob (v1.2.3 fix, user's tester plays with many quests):** when
146+
`UnitIsRelatedToActiveQuest` says yes but the tooltip lists only finished quests, the mob is
147+
marked anyway: with the count of an open objective that names it, or with no count. TO VERIFY in
148+
game: a mob whose only quest is done (ready to turn in) must lose its icon; if it keeps it, the
149+
API also counts finished quests and this fallback needs a stricter test.
145150
- **Badge experiment** (2026-11-09): built, tried in game, user found it ugly and dropped it; the
146151
commits were reverted. Do not bring it back unless asked (maybe with real artwork).
147152
- `/cqi` opens the options, `/cqi toggle` toggles the addon, `/cqi setup` the guide, `/cqi news` what's new, `/cqi plate` measures the target plate.

‎CSCoder_QuestIndicator.lua‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ local function IsQuestMob(unit)
362362
-- an unfinished objective of the quest log gives that quest's count.
363363
local kind, logProgress = ObjectiveKindForName(UnitName(unit))
364364
if kind then return true, kind, logProgress end
365-
return false
365+
-- No objective names it (an item with another name): trust the game and mark the mob,
366+
-- without a count. Players who collect many quests hit this often; a missing mark
367+
-- is worse than a count we can't know.
368+
return true, "normal", nil
366369
end
367370
end
368371
local state, title, progress = ByTooltipInfo(unit)

‎tools/wowmock.lua‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,15 @@ do
253253
if rawget(f, "unit") == "nameplate1" and f._shown then multiCount = rawget(f, "progressValue") end
254254
end
255255
print("quest: second quest on the same mob shows", multiCount)
256+
257+
-- Same, but quest B asks for an item named nothing like the mob: still marked, no count.
258+
env.C_QuestLog.GetQuestObjectives = function() return { { text = "Bundle of Hides: 1/5", finished = false } } end
259+
try("multiquest scan 2", eventFrame._scripts.OnEvent, eventFrame, "QUEST_LOG_UPDATE")
260+
try("multiquest plate 2", eventFrame._scripts.OnEvent, eventFrame, "NAME_PLATE_UNIT_REMOVED", "nameplate1")
261+
try("multiquest plate 2", eventFrame._scripts.OnEvent, eventFrame, "NAME_PLATE_UNIT_ADDED", "nameplate1")
262+
local marked = false
263+
for _, f in ipairs(frames) do if rawget(f, "unit") == "nameplate1" and f._shown then marked = true end end
264+
print("quest: mob still marked when no objective names it", marked)
256265
env.C_TooltipInfo = nil
257266
env.C_QuestLog.GetNumQuestLogEntries = function() return 0 end
258267
env.UnitExists = function() return false end

0 commit comments

Comments
 (0)