mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix quest details parser, ImGui ID conflict, and gossip reopen guard
Quest details parser now reads all 6 choice + 4 reward item slots (matching AzerothCore's fixed-size arrays) with bounds checking at every step. Use loop index for quest ImGui IDs instead of questId to avoid conflicts. Don't reopen gossip window while quest details are showing.
This commit is contained in:
parent
67a3da3bae
commit
a4a39c7f0f
3 changed files with 33 additions and 18 deletions
|
|
@ -1610,8 +1610,9 @@ void GameScreen::renderGossipWindow(game::GameHandler& gameHandler) {
|
|||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "Quests:");
|
||||
for (const auto& quest : gossip.quests) {
|
||||
ImGui::PushID(static_cast<int>(quest.questId));
|
||||
for (size_t qi = 0; qi < gossip.quests.size(); qi++) {
|
||||
const auto& quest = gossip.quests[qi];
|
||||
ImGui::PushID(static_cast<int>(qi));
|
||||
char qlabel[256];
|
||||
snprintf(qlabel, sizeof(qlabel), "[%d] %s", quest.questLevel, quest.title.c_str());
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.3f, 1.0f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue