Decompile fn_13821 (UINewSkillListWnd::Slot35)

Batch #4667 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_13821 UINewSkillListWnd::Slot35: logic confirmed by peer review

Peer-reviewed-by: alisonrag, youko
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 04:31:08 +00:00
commit 07cdf6af18
2 changed files with 32 additions and 1 deletions

View file

@ -1,5 +1,7 @@
#include "UI/Window/UINewSkillListWnd.h"
#include "Contents/UserData/NormalItemSlots.h"
#include "UI/Lists/UIScrollBar.h"
#include "UI/Window/UIWindowMgr.h"
// OFFSET: 0x009B3E70
// FUNCTION: fn_13826
@ -11,3 +13,24 @@ void UINewSkillListWnd::Slot11() {
this->m_saved->height = this->geometry.height;
}
}
// OFFSET: 0x009B2C60
// FUNCTION: fn_13821
void UINewSkillListWnd::Slot35(int delta) {
UIWindow* window = g_windowMgr.LookupWindow(46);
if (window && window->geometry.visible) {
static_cast<UINewSkillListWnd*>(window)->m_scrollBar->Slot35(delta);
return;
}
if (this->m_scrollable) {
int step = this->m_visibleRows - 1;
if (step > 3) {
step = 3;
}
if (delta >= 0) {
step = -step;
}
this->SendMsg(this->m_scrollBar, 7, step, 0, 0, 0);
}
}

View file

@ -4,14 +4,22 @@
#include "UI/Window/UIFrameWnd.h"
struct SkillListWndInfo;
class UIScrollBar;
class UINewSkillListWnd : public UIFrameWnd {
public:
void Slot11() override;
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x198];
/* 00B4 */ unsigned char unknown_00B4[4];
/* 00B8 */ UIScrollBar* m_scrollBar;
/* 00BC */ unsigned char unknown_00BC[0x190];
/* 024C */ SkillListWndInfo* m_saved;
/* 0250 */ unsigned char unknown_0250[0x10];
/* 0260 */ int m_visibleRows;
/* 0264 */ unsigned char unknown_0264[0xC];
/* 0270 */ unsigned char m_scrollable;
};
#endif