From abb395ecb4db470c4981bbe0afea755d4e5b47a2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 18:22:46 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp Batch #14790 by secret: 0 byte-identical, 3 confirmed by peer review. - fn_12358 UIMixAcceptWnd::SendMsg: logic confirmed by peer review - fn_12390 UIYourItemWnd::SendMsg: logic confirmed by peer review - fn_12198 UISelectCartWnd::Slot15: logic confirmed by peer review Peer-reviewed-by: kyoshi, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 69 ++++++++++++--------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 5cbc971db..6f09af022 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -8060,28 +8060,32 @@ int UIJoinFriendAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t // OFFSET: 0x008FF640 // FUNCTION: fn_12358 int UIMixAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (message == 6) { - if (a == 184) { + switch (message) { + case 6: + switch (a) { + case 184: g_windowMgr.CloseWindow(160); g_windowMgr.CloseWindow(161); g_modeMgr.gameMode->SendMsg(266, 0, 0, 0, 0); g_windowMgr.CloseWindow(163); g_session.ClearTradeItems(); - } else if (a == 185) { + break; + case 185: g_windowMgr.CloseWindow(163); + break; } - return 0; + break; + case 91: { + this->m_kind = static_cast(a); + std::string text; + text = LookupMessage(1584); + this->viewer->Clear(); + this->viewer->SendMsg(nullptr, 29, reinterpret_cast(text.c_str()), 38, 0, 0); + break; } - - if (message != 91) { + default: return UIFrameWnd::SendMsg(sender, message, a, b, c, d); } - - this->m_kind = static_cast(a); - std::string text; - text = LookupMessage(1584); - this->viewer->Clear(); - this->viewer->SendMsg(nullptr, 29, reinterpret_cast(text.c_str()), 38, 0, 0); return 0; } @@ -8320,31 +8324,36 @@ int UIStarPlaceAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a // OFFSET: 0x00908080 // FUNCTION: fn_12390 int UIYourItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (message == 6) { - if (a == 184) { + switch (message) { + case 6: + switch (a) { + case 184: { g_modeMgr.GetGameMode(); WearEquipPacket packet; packet.packetType = ID_CZ_REQ_WEAR_EQUIP_V5; packet.index = static_cast(this->m_index); packet.location = this->m_location; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - } else if (a != 185) { - return 0; + g_windowMgr.CloseWindow(138); + break; } - g_windowMgr.CloseWindow(138); - return 0; + case 185: + g_windowMgr.CloseWindow(138); + break; + } + break; + case 91: { + std::string text; + text = LookupMessage(1327); + this->viewer->Clear(); + this->viewer->SendMsg(nullptr, 29, reinterpret_cast(text.c_str()), 38, 0, 0); + this->m_index = static_cast(a); + this->m_location = static_cast(b); + break; } - - if (message != 91) { + default: return UIFrameWnd::SendMsg(sender, message, a, b, c, d); } - - std::string text; - text = LookupMessage(1327); - this->viewer->Clear(); - this->viewer->SendMsg(nullptr, 29, reinterpret_cast(text.c_str()), 38, 0, 0); - this->m_index = static_cast(a); - this->m_location = static_cast(b); return 0; } @@ -9012,11 +9021,11 @@ void UISelectCartWnd::Slot15(int, int) { std::vector& carts = *reinterpret_cast*>(&this->unknown_00B8); const int level = g_session.m_level; carts.clear(); - for (int type = 1; level > levels[type - 1]; ++type) { - carts.push_back(type); - if (type >= 9) { + for (int i = 0; i < 9; ++i) { + if (level <= levels[i]) { break; } + carts.push_back(i + 1); } if (level > 100) { carts.push_back(13);