From fee4c482ac916e4b363515b395ade70429b48455 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 08:12:40 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/ClientTiming.cpp Batch #14282 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_23492 CSession::LoadFogParameters: logic confirmed by peer review - fn_23643 CSession::AddShopName: logic confirmed by peer review Peer-reviewed-by: secret, KWDev, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/ClientTiming.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Source/Contents/ClientTiming.cpp b/Source/Contents/ClientTiming.cpp index 5c2ae5684..cbb071f9a 100644 --- a/Source/Contents/ClientTiming.cpp +++ b/Source/Contents/ClientTiming.cpp @@ -650,16 +650,24 @@ void CSession::SetShopItem(int shopId, unsigned int index, int itemId, int first } } +// INLINED +static __forceinline int LookupShopId(CSession& session, std::string name) { + std::string key = name; + if (key.empty()) { + key = session.m_navigationPlayerMap; + } + + const auto found = session.m_nameToId.find(key); + if (found == session.m_nameToId.end()) { + return -1; + } + return found->second; +} + // OFFSET: 0x00E006E0 // FUNCTION: fn_23643 bool CSession::AddShopName(std::string name, int shopId) { - std::string key = name; - if (key.empty()) { - key = this->m_navigationPlayerMap; - } - - const auto found = this->m_nameToId.find(key); - if (found != this->m_nameToId.end() && found->second != -1) { + if (LookupShopId(*this, name) != -1) { return true; } @@ -888,7 +896,7 @@ bool CSession::LoadFogParameters() { values.push_back(std::string(start, cursor)); } else { std::string last(start, cursor); - values.push_back(last); + values.push_back(std::move(last)); this->m_fogParameters.push_back(std::make_pair(name, values)); name.clear(); values.clear();