rodecomp/Source/UI/Clan/UIClanWnd.cpp
ragnarok-clanker 33cede0bc9 Decompile fn_10629 (UIClanInfoManageWnd::Slot15)
Batch #5020 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_10629 UIClanInfoManageWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: eAthena, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 09:09:50 +00:00

95 lines
2.6 KiB
C++

#include "UI/Clan/UIClanWnd.h"
#include "Contents/ClanInfo.h"
#include "Contents/MessageTable.h"
#include "Contents/UserData/NormalItemSlots.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/SkinPalette.h"
#include "Resource/TextureNames.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Text/UIStaticText.h"
#include <cstdio>
#include <cstring>
#include <windows.h>
// OFFSET: 0x0084CEF0
// FUNCTION: fn_10628
int UIClanInfoManageWnd::Slot53() {
return 0;
}
// OFFSET: 0x0084CFD0
// FUNCTION: fn_10629
void UIClanInfoManageWnd::Slot15(int width, int height) {
if (!this->m_title) {
const char* title = LookupMessage(2355);
this->m_title = new UIStaticText(*this->m_context, *this->m_controls);
this->m_title->SetSize(62, 15);
this->m_title->SetTextFitted(title);
this->m_title->Move(3, 22);
this->AddChild(this->m_title);
this->AddCloseButton(*this->m_controls, "Ctrl+G", 0);
}
this->unknown_00BC = -1;
this->unknown_00C0 = -1;
if (g_clanInfo->m_hasClan) {
g_clanInfo->unknown_0034 = 1;
}
this->LoadEmblem();
}
// OFFSET: 0x0084D8F0
// OFFSET: 0x0084DA30
// FUNCTION: fn_10632
void UIClanInfoManageWnd::Slot25(int x, int y) {
UIFrameWnd::Slot25(x, y);
}
// OFFSET: 0x0084DAE0
// FUNCTION: fn_10634
int UIClanWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
if (message == 34) {
this->m_saved = reinterpret_cast<ClanWndInfo*>(a1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();
}
this->Move(this->m_saved->x, this->m_saved->y);
return 0;
}
if (message == 60) {
this->InvalidateChildren();
return 0;
}
return UIFrameWnd::SendMsg(sender, message, a1, a2, a3, a4);
}
// OFFSET: 0x0084DB50
// FUNCTION: fn_10635
void UIClanInfoManageWnd::LoadEmblem() {
if (g_clanInfo->m_hasClan == true) {
char path[256];
std::memset(path, 0, sizeof(path));
std::sprintf(path, "유저인터페이스\\clan_system\\clan_emblem%02d.bmp", g_clanInfo->m_clanId);
this->m_emblem = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(path)));
if (!this->m_emblem) {
this->m_emblem = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\clan_system\\clan_emblem01.bmp")));
}
}
}
// OFFSET: 0x0084DC00
// FUNCTION: fn_10636
void UIClanWnd::Slot11() {
if (this->m_saved) {
this->m_saved->x = this->geometry.x;
this->m_saved->y = this->geometry.y;
this->m_saved->width = this->geometry.width;
this->m_saved->height = this->geometry.height;
}
}