From e816d07ed6f9426b60fe0c46e4349fb3c5441618 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 00:10:30 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/AdventureGuide/UIAdventureGuide.cpp, Source/UI/AdventureGuide/UIAdventureGuide.h Batch #9049 by youko: 0 byte-identical, 3 confirmed by peer review. - fn_14310 AdventureGuide::CUIQuest::RequestNavigation: logic confirmed by peer review - fn_14311 AdventureGuide::CUIItem::SearchNavigation: logic confirmed by peer review - fn_14312 AdventureGuide::CUIQuest::SearchNavigation: logic confirmed by peer review Peer-reviewed-by: pedrao, dori, doczeira Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index 6d1c3fe8..ccd69097 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -2040,9 +2040,72 @@ void CUIItem::RequestNavigation() { } // OFFSET: 0x009DB8F0 +// FUNCTION: fn_14310 +void CUIQuest::RequestNavigation() { + std::string name; + int x = -1; + int y = -1; + std::vector parts = Split(this->unknown_008C, ","); + if (parts.size() > 2) { + name = parts[0]; + x = std::atoi(parts[1].c_str()); + y = std::atoi(parts[2].c_str()); + } + + if (x != -1 && y != -1) { + g_navigationManager.sub_B99030(name, 0, 5, false, x, y, 1002); + } else { + g_navigationManager.sub_B99030(name, 1, 5, false, -1, -1, 1002); + } +} // OFFSET: 0x009DBB80 +// FUNCTION: fn_14311 +void CUIItem::SearchNavigation() { + const std::size_t comma = this->unknown_008C.find(','); + if (comma == std::string::npos) { + return; + } + + std::string name = this->unknown_008C.substr(0, comma); + g_navigationManager.unknown_1264 = name; + g_navigationManager.UpdateSearchResults(); + g_navigationManager.unknown_12C4 = 0; + g_navigationManager.unknown_12C8 = 0; + g_navigationManager.SelectNodeState(); + + UIWindow* window = g_windowMgr.LookupWindow(203); + if (!window) { + window = g_windowMgr.EnsureWindow(203); + } + window->SendMsg(nullptr, 6, 499, 0, 0, 0); +} // OFFSET: 0x009DBCB0 +// FUNCTION: fn_14312 +void CUIQuest::SearchNavigation() { + const std::size_t comma = this->unknown_008C.find(','); + if (comma == std::string::npos) { + return; + } + + std::string name = this->unknown_008C.substr(0, comma); + g_navigationManager.unknown_1264 = name; + g_navigationManager.UpdateSearchResults(); + g_navigationManager.unknown_12C4 = 0; + g_navigationManager.unknown_12C8 = 0; + if (!g_navigationManager.SelectNodeState()) { + this->RequestNavigation(); + g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(4241)), 0, 0, 0, 0); + return; + } + + UIWindow* window = g_windowMgr.LookupWindow(203); + if (!window) { + window = g_windowMgr.EnsureWindow(203); + } + window->Invalidate(); + window->SendMsg(nullptr, 6, 499, 0, 0, 0); +} }