From d9878c945967db19a3869b683ed23964e8be1793 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 05:11:41 +0000 Subject: [PATCH] Decompile fn_23798 (CSession::GetOptionFloat) Batch #4598 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23798 CSession::GetOptionFloat: logic confirmed by peer review Peer-reviewed-by: youko, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Session.h | 1 + Source/Contents/Configuration/ScriptOptions.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Client/Session.h b/Source/Client/Session.h index f7f92cab..7a98129c 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -482,6 +482,7 @@ public: void InitJobNameTable(JobNameInitialization& context); int SyncUnknown0E98(); void LoadXmlTables(); + float GetOptionFloat(const char* key, float fallback); std::string GetAccessoryName(int id); std::string GetWeaponName(int weapon); const char* GetWeaponClassName(int item); diff --git a/Source/Contents/Configuration/ScriptOptions.cpp b/Source/Contents/Configuration/ScriptOptions.cpp index daa31702..d9b657e2 100644 --- a/Source/Contents/Configuration/ScriptOptions.cpp +++ b/Source/Contents/Configuration/ScriptOptions.cpp @@ -1,7 +1,7 @@ #include "Contents/Configuration/ScriptOptions.h" #include "Script/LuaScript.h" #include "Utility/GuidParse.h" - +#include "Client/Session.h" #include // OFFSET: 0x00E0A890 @@ -36,3 +36,11 @@ GUID ScriptOptions::Guid(const char* key, const GUID& fallback) { return fallback; } + +// OFFSET: 0x00E0A670 +// FUNCTION: fn_23798 +float CSession::GetOptionFloat(const char* key, float fallback) { + double value = -1.0; + this->m_hotkeyScript->Call("l_GetOptionValue", "s>l", key, &value); + return value == -1.0 ? fallback : static_cast(value); +}