From 161284ab4dfcd06865a4dca99c74d8a124db3bc5 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 01:54:07 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/StylingShop/UIStylingShopWnd.cpp Batch #17661 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_10378 ToggleStylingAccessory: logic confirmed by peer review - fn_10331 UIStylingShopWnd::AddTab: 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/StylingShop/UIStylingShopWnd.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/UI/StylingShop/UIStylingShopWnd.cpp b/Source/UI/StylingShop/UIStylingShopWnd.cpp index cc4c03360..b515ede9c 100644 --- a/Source/UI/StylingShop/UIStylingShopWnd.cpp +++ b/Source/UI/StylingShop/UIStylingShopWnd.cpp @@ -823,13 +823,13 @@ void UIShowInfoWnd::ArrangeCheckBoxes(const int& layout) { // FUNCTION: fn_10378 __declspec(noinline) void ToggleStylingAccessory(int itemId, int slot) { UIStylingShopWnd* shop = static_cast(g_windowMgr.LookupWindow(WID_STYLINGSHOPWND)); - UIStylingshopTabParentWnd* tab = nullptr; - for (auto it = shop->m_tabs.begin(); it != shop->m_tabs.end(); ++it) { + auto it = shop->m_tabs.begin(); + for (; it != shop->m_tabs.end(); ++it) { if (it->first->geometry.id == 497) { - tab = it->second; break; } } + UIStylingshopTabParentWnd* tab = it != shop->m_tabs.end() ? it->second : nullptr; ITEM_DESC desc = FindItemDescription(itemId); UIDisplayCharacter* display; @@ -1515,7 +1515,8 @@ void UIStylingShopWnd::AddTab(const char* normal, const char* hover, const char* button->SetTooltip(tooltip); this->AddChild(button); - tab->SetSize(this->geometry.width - (button->geometry.x + button->BitmapWidth()), this->geometry.height - 47); + int right = button->geometry.x + button->BitmapWidth(); + tab->SetSize(this->geometry.width - right, this->geometry.height - 47); tab->Move(static_cast(this->geometry.width * 0.1), 17); tab->Show(0); this->AddChild(tab);