From af1feeeb12977170277a692b065da38d55023c8d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 04:32:23 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Hotkeys/HotkeyInfo.cpp, Source/Contents/Hotkeys/HotkeyInfo.h Batch #11730 by cremane: 2 byte-identical, 0 confirmed by peer review. - fn_10278 SkillTooltipPercent: byte-identical - fn_10279 SkillTooltipFlat: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Contents/Hotkeys/HotkeyInfo.cpp | 16 ++++++---------- Source/Contents/Hotkeys/HotkeyInfo.h | 2 ++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Source/Contents/Hotkeys/HotkeyInfo.cpp b/Source/Contents/Hotkeys/HotkeyInfo.cpp index 51dd1e26..c9c4ca31 100644 --- a/Source/Contents/Hotkeys/HotkeyInfo.cpp +++ b/Source/Contents/Hotkeys/HotkeyInfo.cpp @@ -38,25 +38,21 @@ bool SkillUsesPercentSp(int id) { // OFFSET: 0x008224C0 // FUNCTION: fn_10278 std::string SkillTooltipPercent(const char* hotkey, const char* name, int level, int sp, int ap) { - char text[4096]; if (ap != 0) { - _snprintf_s(text, sizeof(text), _TRUNCATE, "%s %s Use Lv %d (Sp : %d%%, Ap : %d)", hotkey, name, level, sp, ap); - } else { - _snprintf_s(text, sizeof(text), _TRUNCATE, "%s %s Use Lv %d (Sp : %d%%)", hotkey, name, level, sp); + return FormatOwnedString("%s %s Use Lv %d (Sp : %d%%, Ap : %d)", hotkey, name, level, sp, ap); } - return text; + + return FormatOwnedString("%s %s Use Lv %d (Sp : %d%%)", hotkey, name, level, sp); } // OFFSET: 0x00822550 // FUNCTION: fn_10279 std::string SkillTooltipFlat(const char* hotkey, const char* name, int level, int sp, int ap) { - char text[4096]; if (ap != 0) { - _snprintf_s(text, sizeof(text), _TRUNCATE, "%s %s Use Lv %d (Sp : %d, Ap : %d)", hotkey, name, level, sp, ap); - } else { - _snprintf_s(text, sizeof(text), _TRUNCATE, "%s %s Use Lv %d (Sp : %d)", hotkey, name, level, sp); + return FormatOwnedString("%s %s Use Lv %d (Sp : %d, Ap : %d)", hotkey, name, level, sp, ap); } - return text; + + return FormatOwnedString("%s %s Use Lv %d (Sp : %d)", hotkey, name, level, sp); } // INLINED diff --git a/Source/Contents/Hotkeys/HotkeyInfo.h b/Source/Contents/Hotkeys/HotkeyInfo.h index 669a8dc6..543e34ca 100644 --- a/Source/Contents/Hotkeys/HotkeyInfo.h +++ b/Source/Contents/Hotkeys/HotkeyInfo.h @@ -1,6 +1,8 @@ #ifndef RAGNAROK_SOURCE_CONTENTS_HOTKEYS_HOTKEYINFO_H #define RAGNAROK_SOURCE_CONTENTS_HOTKEYS_HOTKEYINFO_H +#include "Utility/Text/FormatString.h" + #include #include