From 3dc6ea302bd2651eecb562d2671f8b873c300de3 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 08:57:44 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/AdventureGuideMgr.cpp Batch #1974 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_05189 FindMapped: logic confirmed by peer review - fn_05190 FindMapped: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy Reviewed-by: ragnarok-clanker --- Source/Contents/AdventureGuideMgr.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/Contents/AdventureGuideMgr.cpp b/Source/Contents/AdventureGuideMgr.cpp index 3106cf6..81b7d0c 100644 --- a/Source/Contents/AdventureGuideMgr.cpp +++ b/Source/Contents/AdventureGuideMgr.cpp @@ -9,8 +9,22 @@ // GLOBAL: gl_24502 CAdventureGuideMgr* g_adventureGuideMgr; -template -static std::optional FindMapped(Map& map, const typename Map::key_type& key) { +using AdventureGuideEntryTable = std::map>; +using AdventureGuideContentsTable = std::map>; + +// OFFSET: 0x0065F680 +// FUNCTION: fn_05189 +static std::optional FindMapped(AdventureGuideEntryTable& map, const int& key) { + auto it = map.find(key); + if (it == map.end()) { + return std::nullopt; + } + return &it->second; +} + +// OFFSET: 0x0065F6D0 +// FUNCTION: fn_05190 +static std::optional FindMapped(AdventureGuideContentsTable& map, const int& key) { auto it = map.find(key); if (it == map.end()) { return std::nullopt;