Decompile 2 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp, Source/UI/Dialogs/UIMenuWnd.h, ...

Batch #1908 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review.

- fn_12289 UIMenuWnd::Slot28: logic confirmed by peer review
- fn_12309 UIEquipWnd::Slot35: logic confirmed by peer review

Peer-reviewed-by: eAthena, Yommy
Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-28 23:49:39 +00:00
commit 5a145c119d
4 changed files with 50 additions and 2 deletions

View file

@ -194,7 +194,9 @@ public:
/* 807C */ unsigned char unknown_807C[0x38];
/* 80B4 */ std::map<std::string, int> m_nameToId;
/* 80BC */ std::map<int, SessionShop> m_shops;
/* 80C4 */ unsigned char unknown_80C4[0x58];
/* 80C4 */ unsigned char unknown_80C4[4];
/* 80C8 */ int unknown_80C8;
/* 80CC */ unsigned char unknown_80CC[0x50];
/* 811C */ std::vector<ItemInfo> m_cardItems;
/* 8128 */ unsigned char unknown_8128[0x0C];
/* 8134 */ int unknown_8134;

View file

@ -1,4 +1,5 @@
#include "Client/Application/ApplicationWindow.h"
#include "Client/Session.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Client/Mode/ActiveGameMode.h"
#include "Client/Mode/CGameMode.h"
@ -587,6 +588,29 @@ void UIMenuWnd::Slot27(int x, int y) {
this->Slot28(x, y);
}
// OFFSET: 0x008F4680
// FUNCTION: fn_12289
void UIMenuWnd::Slot28(int x, int y) {
const int previous = this->m_selected;
this->m_selected = this->ItemAt(x, y);
if (previous != this->m_selected) {
this->Invalidate();
}
}
// OFFSET: 0x008D99D0
// FUNCTION: fn_12134
int UIMenuWnd::ItemAt(int x, int y) {
if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) {
return -1;
}
int row = y / (this->m_itemHeight / 2);
const unsigned index = row < 0 ? 0 : row;
const unsigned last = static_cast<unsigned>(this->m_items.size()) - 1;
return index <= last ? index : last;
}
// OFFSET: 0x008F4D40
// FUNCTION: fn_12294
void UIEquipWnd::Slot19() {
@ -649,6 +673,14 @@ void UIExchangeWnd::Slot35(int delta) {
this->SendMsg(this->m_scrollBar, 7, delta < 0 ? 1 : -1, 0, 0, 0);
}
// OFFSET: 0x008F59C0
// FUNCTION: fn_12309
void UIEquipWnd::Slot35(int delta) {
if (g_session.unknown_80C8 > 4 && this->m_page == 3) {
this->SendMsg(this->m_scrollBar, 8, delta < 0 ? 1 : -1, 0, 0, 0);
}
}
// OFFSET: 0x008F5A50
// FUNCTION: fn_12311
void UIItemIdentifyWnd::Slot35(int delta) {

View file

@ -3,9 +3,20 @@
#include "UI/Window/UIFrameWnd.h"
#include <string>
#include <vector>
class UIMenuWnd : public UIFrameWnd {
public:
/* 00B4 */ int m_menuId;
/* 00B8 */ int m_selected;
/* 00BC */ int m_itemHeight;
/* 00C0 */ std::vector<std::string> m_items;
void Slot27(int x, int y) override;
void Slot28(int x, int y) override;
int ItemAt(int x, int y);
};
#endif

View file

@ -7,13 +7,16 @@ class UIEquipWnd : public UIFrameWnd {
public:
/* 00B4 */ unsigned char unknown_00B4[0x3C];
/* 00F0 */ int m_page;
/* 00F4 */ unsigned char unknown_00F4[0x60];
/* 00F4 */ unsigned char unknown_00F4[0x40];
/* 0134 */ UIWindow* m_scrollBar;
/* 0138 */ unsigned char unknown_0138[0x1C];
/* 0154 */ int m_firstSlot;
/* 0158 */ int m_hoverSlot;
void Slot19() override;
void Slot27(int x, int y) override;
void Slot31(int x, int y) override;
void Slot35(int delta) override;
};
#endif