Decompile fn_13001 (UIGuildPositionManageWnd::UIGuildPositionManageWnd)

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

- fn_13001 UIGuildPositionManageWnd::UIGuildPositionManageWnd: logic confirmed by peer review

Peer-reviewed-by: youko, superintelligence
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 00:15:44 +00:00
commit c9bdfc7e57
2 changed files with 93 additions and 7 deletions

View file

@ -1,4 +1,6 @@
#include "UI/Guild/UIGuildWnd.h"
#include "Contents/GuildMgr.h"
#include "Resource/EmblemResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/SkinPalette.h"
#include "UI/Buttons/UIButton.h"
@ -6,6 +8,9 @@
#include <windows.h>
#include <timeapi.h>
#include <cwchar>
#include <string>
// OFFSET: 0x00957D30
// FUNCTION: fn_13044
int UIGuildBanishedMemberWnd::Tab() {
@ -215,3 +220,35 @@ void UIGuildTotalInfoWnd::Slot35(int delta) {
this->SendMsg(this->m_scrollBar, 7, step, 0, 0, 0);
}
}
UIGuildWnd::UIGuildWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls)
: UIFrameWnd(windows, frames, 0), unknown_00B4(0), unknown_00B8(0), unknown_00BC(0), unknown_00C0(0), unknown_00C4(0), unknown_00C8(0),
unknown_00CC(0), m_controls(&controls) {
}
// OFFSET: 0x00953D70
// FUNCTION: fn_13001
UIGuildPositionManageWnd::UIGuildPositionManageWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls)
: UIGuildWnd(windows, frames, controls), m_buttonTime(0) {
for (int index = 0; index < 11; ++index) {
this->unknown_00D0[index] = 0;
this->unknown_00FC[index] = 0;
this->unknown_0128[index] = 0;
this->unknown_0180[index] = 0;
this->unknown_0154[index] = 0;
this->unknown_01D8[index] = 0;
this->unknown_01AC[index] = 0;
}
}
// OFFSET: 0x00956050
// OFFSET: 0x009578F0
// OFFSET: 0x00957BB0
// OFFSET: 0x00957CA0
// OFFSET: 0x00960230
// OFFSET: 0x00960470

View file

@ -3,18 +3,43 @@
#include "UI/Window/UIFrameWnd.h"
#include "Contents/Skills/SkillInfo.h"
#include <cstdint>
#include <list>
#include <map>
#include <string>
class UIButton;
struct UIButtonContext;
int CompareWideText(const char* left, const char* right);
struct GuildPositionEntry {
/* 0000 */ int id;
/* 0004 */ int unknown_0004;
/* 0008 */ std::string name;
/* 0020 */ int unknown_0020;
/* 0024 */ int unknown_0024;
/* 0028 */ int unknown_0028;
/* 002C */ int unknown_002C;
};
class UIGuildWnd : public UIFrameWnd {
public:
UIGuildWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls);
void Paint() override;
void Slot25(int x, int y) override;
virtual int Tab() = 0;
protected:
/* 00B4 */ int unknown_00B4;
/* 00B8 */ int unknown_00B8;
/* 00BC */ int unknown_00BC;
/* 00C0 */ int unknown_00C0;
/* 00C4 */ int unknown_00C4;
/* 00C8 */ int unknown_00C8;
/* 00CC */ int unknown_00CC;
UIButtonContext* m_controls;
};
@ -24,7 +49,7 @@ public:
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x74];
/* 00D0 */ unsigned char unknown_00D0[0x58];
/* 0128 */ UIWindow* m_scrollBar;
/* 012C */ unsigned char unknown_012C[0xC];
/* 0138 */ int m_visibleRows;
@ -34,6 +59,12 @@ protected:
class UIGuildInfoManageWnd : public UIGuildWnd {
public:
int Tab() override;
void Slot19() override;
protected:
/* 00D0 */ unsigned char unknown_00D0[0x24];
/* 00F4 */ std::uint32_t m_guildId;
/* 00F8 */ unsigned char unknown_00F8[0x10];
};
class UIGuildMemberManageWnd : public UIGuildWnd {
@ -45,7 +76,7 @@ public:
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x94];
/* 00D0 */ unsigned char unknown_00D0[0x78];
/* 0148 */ UIWindow* m_scrollBar;
/* 014C */ UIButton* m_button;
/* 0150 */ unsigned char unknown_0150[0xC];
@ -69,32 +100,50 @@ public:
class UIGuildPositionManageWnd : public UIGuildWnd {
public:
UIGuildPositionManageWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls);
void Slot19() override;
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x150];
/* 00D0 */ int unknown_00D0[11];
/* 00FC */ int unknown_00FC[11];
/* 0128 */ int unknown_0128[11];
/* 0154 */ int unknown_0154[11];
/* 0180 */ int unknown_0180[11];
/* 01AC */ int unknown_01AC[11];
/* 01D8 */ int unknown_01D8[11];
/* 0204 */ UIWindow* m_scrollBar;
/* 0208 */ UIButton* m_button;
/* 020C */ unsigned char unknown_020C[0xC];
/* 0218 */ int m_visibleRows;
/* 021C */ int m_scrollable;
/* 0220 */ unsigned char unknown_0220[0x10];
/* 0220 */ std::list<GuildPositionEntry> m_positions;
/* 0228 */ std::map<int, GuildPositionEntry> m_positionMap;
/* 0230 */ std::uint32_t m_buttonTime;
};
class UIGuildSkillWnd : public UIGuildWnd {
public:
int Tab() override;
void Slot32(int x, int y) override;
void Slot33(int x, int y) override;
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x20];
int SkillIndexAt(int x, int y);
CSkillInfo SkillAt(int index);
CSkillInfo VisibleSkillAt(int row);
/* 00D0 */ unsigned char unknown_00D0[0x04];
/* 00D4 */ UIWindow* m_scrollBar;
/* 00D8 */ unsigned char unknown_00D8[0x68];
/* 00D8 */ unsigned char unknown_00D8[0x5C];
/* 0134 */ int m_hoverIndex;
/* 0138 */ int m_scrollTop;
/* 013C */ int m_columns;
/* 0140 */ int m_visibleRows;
/* 0144 */ int m_scrollable;
/* 0148 */ std::list<CSkillInfo> m_skills;
/* 0150 */ unsigned char unknown_0150[0x0C];
};
class UIGuildTotalInfoWnd : public UIGuildWnd {
@ -103,7 +152,7 @@ public:
void Slot35(int delta) override;
protected:
/* 00B4 */ unsigned char unknown_00B4[0x4C];
/* 00D0 */ unsigned char unknown_00D0[0x30];
/* 0100 */ UIWindow* m_scrollBar;
/* 0104 */ unsigned char unknown_0104[0xC];
/* 0110 */ int m_visibleRows;