From 55c72479054401bca2df43c296df7de16a5a9a05 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 02:17:09 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/RuneSystem/UIRuneSystemWnd.cpp, Source/UI/ProbabilityTable/UIProbabilityTable.cpp Batch #17691 by eAthena: 0 byte-identical, 3 confirmed by peer review. - fn_10178 UIGage_Circle::Paint: logic confirmed by peer review - fn_10227 UIRuneSystem_tagListWnd::SendMsg: logic confirmed by peer review - fn_16117 CUIListBoxEx::OnCreate: logic confirmed by peer review Peer-reviewed-by: Yommy, cremane, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/ProbabilityTable/UIProbabilityTable.cpp | 6 ++++-- Source/UI/RuneSystem/UIRuneSystemWnd.cpp | 12 +++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp index b0290af7f..1d91176f4 100644 --- a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp +++ b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp @@ -187,8 +187,10 @@ template <> void CUIListBoxEx::OnCreate(int width, int height) { this->scrollBar = new CUIVScrollBar(); this->scrollBar->Show(0); - const std::function onChange = [this](int position) { this->OnScroll(position); }; - this->scrollBar->onChange = onChange; + { + const std::function onChange = [this](int position) { this->OnScroll(position); }; + this->scrollBar->onChange = onChange; + } this->AddChild(this->scrollBar); } diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 1adb03198..e8adbab82 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -589,16 +589,14 @@ int UIRuneSystem_tagListWnd::SendMsg(UIWindow*, int message, std::intptr_t argum this->m_firstTag = --this->m_firstTag < 0 ? 0 : this->m_firstTag; this->Invalidate(); break; - case ID_NEXT_PAGE: { + case ID_NEXT_PAGE: ++this->m_firstTag; - const int first = this->m_firstTag; - if (CRuneSystemMgr::GetInstance()->GetTagCount() < first + 10) { - this->m_firstTag = first - 1; + if (CRuneSystemMgr::GetInstance()->GetTagCount() < this->m_firstTag + 10) { + --this->m_firstTag; } this->Invalidate(); break; } - } break; case 0xA9: this->Move(0, (argument1 == 0 ? argument2 : 0) + 44); @@ -1135,8 +1133,8 @@ void UIGage_Circle::Paint() { ); const std::string text = FormatOwnedString("%.2f%%", static_cast(static_cast(this->m_value) * 0.001f)); - const int width = this->TextWidth(text.c_str(), text.size(), 0, 12, 0, 0); - this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), this->m_textY, text.c_str(), 0, + const int space = this->geometry.width - this->TextWidth(text.c_str(), text.size(), 0, 12, 0, 0); + this->DrawTextAt(static_cast(static_cast(space) * 0.5f), this->m_textY, text.c_str(), 0, 0, 12, 0xFFFFFF, 1, 0 ); }