From b1c8d63a32f10e289a7e24443cfc5250dece4e9c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 09:25:35 +0000 Subject: [PATCH] Decompile fn_14357 (CUIAdventureGuide::MarkQuest) Batch #5139 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_14357 CUIAdventureGuide::MarkQuest: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index e44777be..d61b798b 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -316,3 +316,32 @@ void CUIListBox::SelectItem(CUIListItem* item) { } // OFFSET: 0x009DEBF0 +// FUNCTION: fn_14357 +void CUIAdventureGuide::MarkQuest(int questId) { + for (AdventureGuide::CUITab* tab : this->tabs->items) { + if (tab->type != 1) { + continue; + } + + if (tab->subTabs) { + std::list subTabs = tab->subTabs->items; + auto found = std::find_if(subTabs.begin(), subTabs.end(), [questId](AdventureGuide::CUISubTab* subTab) { + return subTab->unknown_00F4 == static_cast(questId); + }); + if (found != subTabs.end()) { + (*found)->unknown_00EC->Show(1); + } + } + + AdventureGuide::CUIQuest* quest = dynamic_cast(tab->page); + if (quest) { + std::vector items = quest->questList->items; + auto found = std::find_if(items.begin(), items.end(), [questId](AdventureGuide::CUIQuestInfo* item) { + return item->questId == questId; + }); + if (found != items.end()) { + (*found)->unknown_00E8->Show(1); + } + } + } +}