rodecomp/Source/UI/Window/UIOpenRoulletteWnd.cpp
ragnarok-clanker 0c10747096 Decompile 12 functions in Source/UI/Quest/UIQuestDisplay.cpp, Source/UI/Quest/UIQuestDisplay.h, ...
Batch #7711 by secret: 0 byte-identical, 12 confirmed by peer review.

- fn_12846 UIAccountLimitedToolWnd::UIAccountLimitedToolWnd: logic confirmed by peer review
- fn_12847 UIBalloonOpenBtn::UIBalloonOpenBtn: logic confirmed by peer review
- fn_12848 UIDebuffRemoveWnd::UIDebuffRemoveWnd: logic confirmed by peer review
- fn_12850 UIMileageWnd::UIMileageWnd: logic confirmed by peer review
- fn_12852 UINoteWnd::UINoteWnd: logic confirmed by peer review
- fn_12853 UIOpenMailBoxWnd::UIOpenMailBoxWnd: logic confirmed by peer review
- fn_12854 UIOpenRoulletteWnd::UIOpenRoulletteWnd: logic confirmed by peer review
- fn_12855 UIQuestDisplay::UIQuestDisplay: logic confirmed by peer review
- fn_12856 UIRPImageWnd2::UIRPImageWnd2: logic confirmed by peer review
- fn_12857 UISecondCostumeWnd::UISecondCostumeWnd: logic confirmed by peer review
- fn_12858 UIShowWarpWnd::UIShowWarpWnd: logic confirmed by peer review
- fn_12859 UITransMenuWnd::UITransMenuWnd: logic confirmed by peer review

Peer-reviewed-by: eAthena, Yommy
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-31 11:28:47 +00:00

61 lines
1.9 KiB
C++

#include "UI/Window/UIOpenRoulletteWnd.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "Network/Connection/Connection.h"
#include "Network/Packets/PacketId.h"
#include "Network/Packets/PacketLengths.h"
#include "UI/Window/UIWindowMgr.h"
#include <cstdint>
namespace {
#pragma pack(push, 1)
struct RouletteOpenPacket {
/* 0000 */ std::int16_t id;
};
#pragma pack(pop)
}
// OFFSET: 0x0094F1C0
// FUNCTION: fn_12933
void UIOpenRoulletteWnd::Slot19() {
}
// OFFSET: 0x0094C4E0
// FUNCTION: fn_12897
void UIOpenRoulletteWnd::Slot15(int width, int height) {
auto* button = new UIBitmapButton(*this->m_context, *this->m_controls);
button->SetBitmap("유저인터페이스\\basic_interface\\roullette\\RoulletteIcon.bmp", 0, 0);
button->SetBitmap("유저인터페이스\\basic_interface\\roullette\\RoulletteIcon.bmp", 1, 0);
button->SetBitmap("유저인터페이스\\basic_interface\\roullette\\RoulletteIcon.bmp", 2, 0);
button->SetSize(button->BitmapWidth(), button->BitmapHeight());
button->SetId(192);
this->AddChild(button);
}
// OFFSET: 0x0094D900
// FUNCTION: fn_12910
void UIOpenRoulletteWnd::Paint() {
}
// OFFSET: 0x00950B60
// FUNCTION: fn_12946
int UIOpenRoulletteWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
if (message != 6) {
return this->UIWindow::SendMsg(sender, message, a, b, c, d);
}
if (a == 192 && g_windowMgr.unknown_0464 == nullptr) {
RouletteOpenPacket packet;
packet.id = ID_CZ_REQ_OPEN_ROULETTE;
CRagConnection& connection = GetRagConnection();
connection.Send(g_packetLengths.FixedLength(packet.id), &packet);
}
return 0;
}
// OFFSET: 0x00946E40
// FUNCTION: fn_12854
UIOpenRoulletteWnd::UIOpenRoulletteWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls)
: UIFrameWnd(windows, frames, 0), m_controls(&controls) {
}