rodecomp/Source/Contents/Party/PartyRegistrationCompletion.cpp
ragnarok-clanker 9cca5ba887 Decompile fn_03666 (CAdventurerAgencyMgr::CompleteRegistration)
Batch #12348 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_03666 CAdventurerAgencyMgr::CompleteRegistration: logic confirmed by peer review

Peer-reviewed-by: Yommy, gordaoprogramas, dori
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 16:02:36 +00:00

42 lines
1 KiB
C++

#include "Contents/Party/AdventurerAgencyMgr.h"
#include "Utility/Async/AsyncDiagnostic.h"
#include "Contents/MessageTable.h"
#include "UI/Window/UIWindow.h"
#include "UI/Window/UIWindowMgr.h"
#include <json/reader.h>
#include <json/value.h>
// OFFSET: 0x005CCD20
// FUNCTION: fn_03666
void CAdventurerAgencyMgr::CompleteRegistration(AsyncDiagnostic diagnostic, std::string response) {
--this->pending;
if (!diagnostic.success) {
return;
}
Json::Value root;
Json::Reader reader;
if (!reader.parse(response.c_str(), root, true)) {
return;
}
const int type = root["Type"].asInt();
if (type == 2 || type == 3) {
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(3417)), 0xFF, 0, 0, 0);
return;
}
this->registered = true;
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(3418)), 0xFFFF64, 0, 0, 0);
UIWindow* board = g_windowMgr.LookupWindow(324);
if (board) {
board->SendMsg(nullptr, 6, 415, 0, 0, 0);
} else {
g_windowMgr.EnsureWindow(324);
}
}