From fcfed3b5a09ad2a70deca2f527612e66579b85bf Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 19:11:35 +0000 Subject: [PATCH] Decompile fn_45470 (UIItemWnd::RefreshOptionBox) Batch #8570 by dori: 0 byte-identical, 1 confirmed by peer review. - fn_45470 UIItemWnd::RefreshOptionBox: logic confirmed by peer review Peer-reviewed-by: eAthena, gordaoprogramas, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Edit/UIEditCtrl.cpp | 10 ++++++++++ Source/UI/Item/UIItemWnd.h | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/UI/Edit/UIEditCtrl.cpp b/Source/UI/Edit/UIEditCtrl.cpp index b2834fc2..95fecae7 100644 --- a/Source/UI/Edit/UIEditCtrl.cpp +++ b/Source/UI/Edit/UIEditCtrl.cpp @@ -80,6 +80,7 @@ #include "Utility/Text/GroupedInteger.h" #include "Client/Mode/ModeTooltip.h" #include "Contents/Configuration/ServiceConfiguration.h" +#include "Contents/Configuration/ServiceOptions.h" #include "Contents/Items/ItemNaming.h" #include "Contents/PlayerNameDictionary.h" #include "Contents/UserData/CharacterConfigSave.h" @@ -1686,6 +1687,15 @@ void UIItemWnd::Slot19() { } } +// OFFSET: 0x00995780 +// FUNCTION: fn_45470 +void UIItemWnd::RefreshOptionBox() { + UIWindow* optionBox = this->optionBox; + optionBox->geometry.unknown_0030 = g_serviceOptions.Get(0x108); + optionBox->Invalidate(); + this->Invalidate(); +} + // OFFSET: 0x009886D0 // FUNCTION: fn_13387 void UIMerchantItemMyShopWnd::Slot19() { diff --git a/Source/UI/Item/UIItemWnd.h b/Source/UI/Item/UIItemWnd.h index c6266600..da568861 100644 --- a/Source/UI/Item/UIItemWnd.h +++ b/Source/UI/Item/UIItemWnd.h @@ -21,6 +21,7 @@ public: ITEM_INFO GetItemAt(int x, int y); void ReleaseSelection(unsigned char keep); void DrawNewItemMark(int x, int y); + void RefreshOptionBox(); /* 00F0 */ ItemWndInfo* saved; /* 00F4 */ unsigned char unknown_00F4[0xC]; @@ -31,7 +32,8 @@ public: /* 0110 */ int unknown_0110; /* 0114 */ unsigned char unknown_0114[0x4]; /* 0118 */ UITabControl* tabs; - /* 011C */ unsigned char unknown_011C[0xC]; + /* 011C */ UIWindow* optionBox; + /* 0120 */ unsigned char unknown_0120[0x8]; /* 0128 */ UIWindow* unknown_0128; };