Decompile 3 functions in Source/UI/Edit/UIEditCtrl.cpp, Source/UI/Item/UIItemShopWnd.h, ...

Batch #8759 by eAthena: 0 byte-identical, 3 confirmed by peer review.

- fn_13312 UIItemShopWnd2::Slot15: logic confirmed by peer review
- fn_13313 UIItemShopWnd::Slot15: logic confirmed by peer review
- fn_13323 UIMerchantMirrorItemWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: System4z, aDw, dori
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-31 21:03:44 +00:00
commit 3fedf1d038
4 changed files with 124 additions and 2 deletions

View file

@ -120,6 +120,7 @@ struct ClientItemLists {
void AddItem1730(const ITEM_INFO& item);
void ReduceItem1718(const ITEM_INFO& item);
void ClearItems1760();
void CopyItems1740To1750();
};
struct SessionItemLists {
@ -2921,6 +2922,76 @@ int UIEditCtrl3::DecodeLinkCards(std::vector<int>& fields, const char* text, int
return count;
}
// OFFSET: 0x00977510
// FUNCTION: fn_13312
void UIItemShopWnd2::Slot15(int width, int height) {
this->title = new UIStaticText(*this->m_context, *this->m_controls);
this->title->SetSize(70, 15);
this->title->SetText(LookupMessage(167), 0);
this->title->Move(16, 2);
this->title->shadow = 1;
this->AddChild(this->title);
this->resizer = new UIResizer(*this->m_context);
this->resizer->SetSize(16, 16);
static_cast<UIResizer*>(this->resizer)->SetDirection(7);
static_cast<UIResizer*>(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp");
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
static_cast<UIResizer*>(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF);
this->AddChild(this->resizer);
this->checkBox = new UICheckBox(*this->m_context, *this->m_controls);
this->checkBox->SetSize(200, 12);
this->checkBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(295));
this->checkBox->Move(12, this->geometry.height - 20);
this->checkBox->SetChecked(g_windowMgr.unknown_0064);
this->AddChild(this->checkBox);
UIScrollBar* scrollBar = new UIScrollBar(*this->m_context);
this->scrollBar = scrollBar;
scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17);
this->AddChild(this->scrollBar);
this->columns = 1;
this->visibleRows = (height - this->unknown_0108 - this->unknown_0104 - 17) / 32;
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
}
// OFFSET: 0x009777B0
// FUNCTION: fn_13313
void UIItemShopWnd::Slot15(int width, int height) {
this->title = new UIStaticText(*this->m_context, *this->m_controls);
this->title->SetSize(70, 15);
this->title->SetText(LookupMessage(167), 0);
this->title->Move(16, 2);
this->title->shadow = 1;
this->AddChild(this->title);
this->resizer = new UIResizer(*this->m_context);
this->resizer->SetSize(16, 16);
static_cast<UIResizer*>(this->resizer)->SetDirection(7);
static_cast<UIResizer*>(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp");
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
static_cast<UIResizer*>(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF);
this->AddChild(this->resizer);
this->checkBox = new UICheckBox(*this->m_context, *this->m_controls);
this->checkBox->SetSize(200, 12);
this->checkBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(295));
this->checkBox->Move(12, this->geometry.height - 20);
this->checkBox->SetChecked(g_windowMgr.unknown_0064);
this->AddChild(this->checkBox);
UIScrollBar* scrollBar = new UIScrollBar(*this->m_context);
this->scrollBar = scrollBar;
scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17);
this->AddChild(this->scrollBar);
this->columns = 1;
this->visibleRows = (height - this->unknown_0108 - this->unknown_0104 - 17) / 32;
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
}
// OFFSET: 0x00977A50
// FUNCTION: fn_13314
void UIItemStoreFindWnd::Slot15(int width, int height) {
@ -3012,6 +3083,49 @@ void UIMerchantItemWnd::Slot15(int width, int height) {
this->info->Show(0);
}
// OFFSET: 0x0097BFF0
// FUNCTION: fn_13323
void UIMerchantMirrorItemWnd::Slot15(int width, int height) {
UIStaticText* title = new UIStaticText(*this->m_context, *this->m_controls);
title->SetSize(150, 15);
int messageId;
if (this->unknown_00F4 == 1) {
messageId = 1733;
} else if (this->unknown_00F4 == 2) {
messageId = 1738;
} else {
messageId = 232;
}
title->SetText(LookupMessage(messageId), 0);
title->Move(16, 2);
title->shadow = 1;
this->AddChild(title);
this->resizer = new UIResizer(*this->m_context);
this->resizer->SetSize(16, 16);
static_cast<UIResizer*>(this->resizer)->SetDirection(7);
static_cast<UIResizer*>(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp");
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
static_cast<UIResizer*>(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF);
this->AddChild(this->resizer);
UIScrollBar* scrollBar = new UIScrollBar(*this->m_context);
this->scrollBar = scrollBar;
scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 38);
this->AddChild(this->scrollBar);
this->columns = (width - 40) / 32;
this->visibleRows = (height - 38) / 32;
if (this->unknown_00F4 == 1) {
g_session.CollectItems1750();
} else if (this->unknown_00F4 == 2) {
g_session.RefreshItems1750();
} else if (Replay::Instance().state != 6) {
reinterpret_cast<ClientItemLists*>(&g_session)->CopyItems1740To1750();
}
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
}
// OFFSET: 0x0098A7A0
// FUNCTION: fn_13417
void UISkillListWnd::UpdateRowButtons() {

View file

@ -20,6 +20,7 @@ public:
void Slot25(int x, int y) override;
void Slot26(int x, int y) override;
void Slot32(int x, int y) override;
void Slot15(int width, int height) override;
protected:
union {

View file

@ -8,6 +8,8 @@
#include <cstdint>
struct WindowReplayRecorder;
class UICheckBox;
class UIStaticText;
class UIItemShopWnd2 : public UIItemBaseWnd {
public:
@ -18,12 +20,16 @@ public:
void Slot10(int x, int y, std::intptr_t value) override;
void Slot25(int x, int y) override;
void Slot26(int x, int y) override;
void Slot15(int width, int height) override;
protected:
WindowReplayRecorder* m_recorder;
union {
WindowReplayRecorder* m_recorder;
/* 00F0 */ UIStaticText* title;
};
public:
/* 00F4 */ unsigned char unknown_00F4[0x4];
/* 00F4 */ UICheckBox* checkBox;
/* 00F8 */ int unknown_00F8;
/* 00FC */ WindowPlacement* saved;
/* 0100 */ int hovered;

View file

@ -15,6 +15,7 @@ public:
void Slot11() override;
void Slot10(int x, int y, std::intptr_t value) override;
void Slot25(int x, int y) override;
void Slot15(int width, int height) override;
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
/* 00F0 */ MerchantMirrorItemWndInfo* saved;