From 21bc90f14b0262d605180d646de2189dff2e72d3 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 10:14:13 +0000 Subject: [PATCH] Decompile fn_11788 (UILoginOTPWnd::Slot19) Batch #5310 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_11788 UILoginOTPWnd::Slot19: logic confirmed by peer review Peer-reviewed-by: eAthena, youko Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIMessageBox.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index e40ecf35..6b93deb8 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -1031,6 +1031,19 @@ void UIMakeCharWnd::Slot18() { // OFFSET: 0x008B8E90 // OFFSET: 0x008BA670 +// FUNCTION: fn_11788 +void UILoginOTPWnd::Slot19() { + auto* login = static_cast(g_modeMgr.GetLoginMode()); + if (login == nullptr) { + return; + } + + const unsigned remaining = static_cast(60.0 - (timeGetTime() - login->otpStarted) * 0.001); + const std::uint8_t source[] = {0x6A, 0x91, 0xFD, 0x51, 0x43, 0xED, 0x61, 0x5C, 0x7F, 0x93, 0xAB, 0x35}; + thread_local EncryptedName format(source); + this->timerText->SetText(FormatOwnedString(format.Text(), remaining / 60, remaining % 60).c_str(), 0); + this->Invalidate(); +} // OFFSET: 0x008BAEF0 // FUNCTION: fn_11792