From 7db31d41f181caa28ed41378aa58c07f52420e5b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 14:43:18 +0000 Subject: [PATCH] Decompile fn_12526 (UISelCharForUServerWnd::UISelCharForUServerWnd) Batch #8109 by pedrao: 0 byte-identical, 1 confirmed by peer review. - fn_12526 UISelCharForUServerWnd::UISelCharForUServerWnd: logic confirmed by peer review Peer-reviewed-by: eAthena, secret, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UISelCharForUServerWnd.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Source/UI/Window/UISelCharForUServerWnd.cpp b/Source/UI/Window/UISelCharForUServerWnd.cpp index ca3507fb..e3efa56f 100644 --- a/Source/UI/Window/UISelCharForUServerWnd.cpp +++ b/Source/UI/Window/UISelCharForUServerWnd.cpp @@ -10,6 +10,9 @@ extern const char* LookupMessage(int id); +// GLOBAL: gl_24772 +int g_charViewCount; + #pragma pack(push, 1) struct PACKET_CZ_SELECT_CHARACTERS { /* 0000 */ std::int16_t id; @@ -20,6 +23,23 @@ struct PACKET_CZ_SELECT_CHARACTERS { #pragma pack(pop) // OFFSET: 0x009120E0 +// FUNCTION: fn_12526 +UISelCharForUServerWnd::UISelCharForUServerWnd() + : UIFrameWnd(*reinterpret_cast(nullptr), *reinterpret_cast(nullptr), 0), m_columns(6) { + if (g_charViewCount > 12) { + this->m_columns = 9; + } + + this->unknown_19E8 = 0; + this->m_checkedCount = 0; + this->geometry.unknown_0034 = 0; + this->unknown_19E4 = 0; + for (int index = 0; index < g_charViewCount; ++index) { + this->m_slotEnabled[index] = 1; + } + + this->m_startTime = timeGetTime(); +} // OFFSET: 0x0093A7F0 // FUNCTION: fn_12758