From 3b02da75dc2e53fbfd60201b0429a7321023bb58 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 12:40:19 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/UIMacroUserInfoWnd.cpp Batch #14652 by Yommy: 0 byte-identical, 3 confirmed by peer review. - fn_09841 UIMacroReporterWnd::AddActorRow: logic confirmed by peer review - fn_09843 UIMacroReporterWnd::ValidateNames: logic confirmed by peer review - fn_09854 UIMacroReporterWnd::UpdateScrollBar: logic confirmed by peer review Peer-reviewed-by: secret, Toshiro, raiken Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/UIMacroUserInfoWnd.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/UI/UIMacroUserInfoWnd.cpp b/Source/UI/UIMacroUserInfoWnd.cpp index 3b554728d..354911b62 100644 --- a/Source/UI/UIMacroUserInfoWnd.cpp +++ b/Source/UI/UIMacroUserInfoWnd.cpp @@ -110,8 +110,8 @@ struct AccessibleTextButton : public UITextButton { // OFFSET: 0x007EF430 // FUNCTION: fn_09841 void UIMacroReporterWnd::AddActorRow(int aid, std::string name) { - for (std::size_t i = 0; i < this->m_rows.size(); ++i) { - if (this->m_rows[i].second->geometry.id == aid) { + for (const auto& row : this->m_rows) { + if (row.second->geometry.id == aid) { return; } } @@ -310,9 +310,9 @@ void UIMacroReporterWnd::UpdateScrollBar() { this->m_scrollable = maximum > 0; if (maximum < 1) { this->m_firstRow = 0; - this->m_scrollBar->SetRange(0, this->m_visibleRows, count); + this->m_scrollBar->SetRange(0, this->m_visibleRows, static_cast(this->m_rows.size())); } else { - this->m_scrollBar->SetRange(maximum, this->m_visibleRows, count); + this->m_scrollBar->SetRange(maximum, this->m_visibleRows, static_cast(this->m_rows.size())); if (this->m_firstRow < 0) { this->m_firstRow = 0; this->m_scrollBar->SetPosition(0); @@ -340,8 +340,10 @@ bool UIMacroReporterWnd::ValidateNames(unsigned char notify) { continue; } - std::string displayName = g_mapInfoMgr->GetDisplayName(name + ".rsw"); - if (displayName == LookupMessage(187)) { + name += ".rsw"; + const char* displayName = g_session.GetMapDisplayName(name.c_str()); + const std::string unknownMap = LookupMessage(187); + if (unknownMap == displayName) { if (notify == 1) { g_windowMgr.SendNotice( 1,