From 8bcc7c91bff3eb18bf2152f86f0c8e13a4a7a2fc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 18:20:47 +0000 Subject: [PATCH] Decompile fn_15164 (CUIEquipmentPropertiesWnd::BindLine) Batch #5996 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_15164 CUIEquipmentPropertiesWnd::BindLine: logic confirmed by peer review Peer-reviewed-by: superintelligence, Snow, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Item/UIEquipmentPropertiesWnd.cpp | 27 +++++++++++++++++++++ Source/UI/Item/UIEquipmentPropertiesWnd.h | 1 + 2 files changed, 28 insertions(+) diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp index 9df5e82b..d05ab85c 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp @@ -4,6 +4,8 @@ #include "Resource/ResourceMgr.h" #include "Resource/SkinPalette.h" #include "Resource/TextureNames.h" +#include "UI/Text/UIStaticTextControl.h" +#include "Utility/Text/StringUtil.h" #include #include @@ -180,6 +182,31 @@ void CUIEquipmentPropertiesWnd::OnClickButton9() { void CUIEquipmentPropertiesWnd::OnSelectLine(EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* line, const std::string& text) { } +// OFFSET: 0x00A0EF30 +// FUNCTION: fn_15164 +void CUIEquipmentPropertiesWnd::BindLine(EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* line, const std::string& text) { + if (text.size() == 0) { + return; + } + + line->unknown_00E8->SetColor(0xFF2A00); + line->unknown_00EC->SetColor(0); + std::vector parts = Split(text, "#"); + if (parts.size() > 1) { + std::vector title = Split(parts[0], "{~}"); + if (title.size() > 1) { + line->unknown_00E8->SetColor(0x3C00FF); + line->unknown_00E8->SetText(title[1].c_str(), title[1].size()); + } else { + line->unknown_00E8->SetText(parts[0].c_str(), parts[0].size()); + } + line->unknown_00EC->SetText(parts[1].c_str(), parts[1].size()); + } else { + line->unknown_00E8->SetText("", 0); + line->unknown_00EC->SetText(parts[0].c_str(), parts[0].size()); + } +} + // OFFSET: 0x00A0F0F0 // FUNCTION: fn_15165 void CUIEquipmentPropertiesWnd::Paint() { diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.h b/Source/UI/Item/UIEquipmentPropertiesWnd.h index 24ef8cae..6be37863 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.h +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.h @@ -46,6 +46,7 @@ public: void OnClickButton8(); void OnClickButton9(); void OnSelectLine(EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* line, const std::string& text); + void BindLine(EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* line, const std::string& text); void Slot16() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; void SetTab(const int& tab);