Fix quest item loot parsing and quest item progress tracking

- add SMSG_QUESTUPDATE_ADD_ITEM logical opcode mapping (0x197)
- handle quest item progress updates in GameHandler
- parse quest-item section in SMSG_LOOT_RESPONSE (regular + quest items)
- add quest item progress storage in quest log entries
- show tracked kill/item progress in Quest Log UI
This commit is contained in:
Kelsi 2026-02-18 04:06:14 -08:00
parent d3b04640f3
commit 98212a3f91
7 changed files with 79 additions and 1 deletions

View file

@ -160,6 +160,21 @@ void QuestLogScreen::render(game::GameHandler& gameHandler) {
ImGui::TextWrapped("%s", processedObjectives.c_str());
}
if (!sel.killCounts.empty() || !sel.itemCounts.empty()) {
ImGui::Separator();
ImGui::TextColored(ImVec4(0.8f, 0.9f, 1.0f, 1.0f), "Tracked Progress");
for (const auto& [entry, progress] : sel.killCounts) {
ImGui::BulletText("Kill %u: %u/%u", entry, progress.first, progress.second);
}
for (const auto& [itemId, count] : sel.itemCounts) {
std::string itemLabel = "Item " + std::to_string(itemId);
if (const auto* info = gameHandler.getItemInfo(itemId)) {
if (!info->name.empty()) itemLabel = info->name;
}
ImGui::BulletText("%s: %u", itemLabel.c_str(), count);
}
}
// Abandon button
if (!sel.complete) {
ImGui::Separator();