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).
This commit is contained in:
ragnarok-clanker 2026-10-30 18:20:47 +00:00
commit 8bcc7c91bf
2 changed files with 28 additions and 0 deletions

View file

@ -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 <list>
#include <string>
@ -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<std::string> parts = Split(text, "#");
if (parts.size() > 1) {
std::vector<std::string> 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() {

View file

@ -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);