rodecomp/Source/UI/Acceptance/UIJoinPartyAcceptWnd.cpp
ragnarok-clanker 07897c8bea Maintenance: Annotation cleanup, no code change (resubmission of 10984). Every // FUNCTION: line now has // OFFSET: <its address from
Batch #11163 by ragnarok-clanker: no function's compiled code changes; checked with 226 compiled unit(s), including every includer of Source/Client/Application/UnhandledExceptionHandler.h, Source/Contents/ReputeMgrLoad.inl, Source/Render/RenderSystemBase.h, Source/UI/Lists/UIListBoxTemplate.h, Source/Utility/Async/NRecycleObject.h.
2026-11-04 21:29:46 +00:00

81 lines
2.2 KiB
C++

#include "Client/Mode/CMode.h"
#include "Contents/MessageTable.h"
#include "Client/Mode/ModeEvents.h"
#include "Client/Replay.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Acceptance/UIJoinPartyAcceptWnd.h"
#include "UI/Text/UITextViewer.h"
#include "UI/Window/UINewSelectCharWnd.h"
#include "UI/Window/WindowManagerWindows.h"
#include <cstring>
// OFFSET: 0x008C8240
// FUNCTION: fn_11950
UIJoinPartyAcceptWnd::UIJoinPartyAcceptWnd()
: UIExchangeAcceptWnd() {
}
UIJoinPartyAcceptWnd::~UIJoinPartyAcceptWnd() = default;
// OFFSET: 0x008FE780
// FUNCTION: fn_12353
int UIJoinPartyAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
if (message == 6) {
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, d);
if (response == 184 || response == 185) {
g_windowMgr.CloseWindow(35);
static_cast<CMode*>(g_charViewMode)->SendMsg(60, this->identity, response == 184, 0, 0);
}
return 0;
}
if (message == 56) {
this->identity = static_cast<std::uint32_t>(a);
std::string text = "(";
text += reinterpret_cast<const char*>(b);
text += ")";
text += LookupMessage(94);
this->viewer->Clear();
this->viewer->SendMsg(nullptr, 29, reinterpret_cast<std::intptr_t>(text.c_str()), 38, 0, 0);
return 0;
}
if (message == 123) {
const auto* bytes = reinterpret_cast<const unsigned char*>(a);
std::uint16_t marker;
std::memcpy(&marker, bytes, sizeof(marker));
unsigned offset = 6;
if (marker == 21750) {
while (static_cast<unsigned>(b) > offset) {
std::uint16_t kind;
std::uint32_t size;
std::memcpy(&kind, bytes + offset, sizeof(kind));
std::memcpy(&size, bytes + offset + 2, sizeof(size));
offset += 6;
if (kind == 21751) {
break;
}
if (kind == 21752) {
char text[260] = {};
std::memcpy(text, bytes + offset, size);
offset += size;
this->SendMsg(nullptr, 56, 0, reinterpret_cast<std::intptr_t>(text), 0, 0);
} else {
offset += size;
}
}
}
return 0;
}
return this->UIFrameWnd::SendMsg(sender, message, a, b, c, d);
}