refactor: extract fallback textures, add why-comments, name WMO constant

- character_renderer: extract duplicated fallback texture creation
  (white/transparent/flat-normal) into createFallbackTextures() — was
  copy-pasted between initialize() and clear()
- wmo_renderer: replace magic 8192 with kMaxRetryTracked constant,
  add why-comment explaining the fallback-retry set cap (Dalaran has
  2000+ unique WMO groups)
- quest_handler: add why-comment on reqCount=0 fallback — escort/event
  quests can report kill credit without objective counts in query response
This commit is contained in:
Kelsi 2026-03-30 14:06:30 -07:00
parent f313eec24e
commit 4acebff65c
4 changed files with 40 additions and 44 deletions

View file

@ -533,7 +533,10 @@ void QuestHandler::registerOpcodes(DispatchTable& table) {
}
}
}
if (reqCount == 0) reqCount = count; // last-resort: avoid 0/0 display
// Some quests (e.g. escort/event quests) report kill credit updates without
// a corresponding objective count in SMSG_QUEST_QUERY_RESPONSE. Fall back to
// current count so the progress display shows "N/N" instead of "N/0".
if (reqCount == 0) reqCount = count;
quest.killCounts[entry] = {count, reqCount};
std::string creatureName = owner_.getCachedCreatureName(entry);