From e4396167ca03037c03bb2ff288102c871f959cdc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 14:09:29 +0000 Subject: [PATCH] Decompile fn_03666 (CAdventurerAgencyMgr::CompleteRegistration) Batch #17137 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_03666 CAdventurerAgencyMgr::CompleteRegistration: logic confirmed by peer review Peer-reviewed-by: alisonrag, Toshiro, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Party/PartyRegistrationCompletion.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/Contents/Party/PartyRegistrationCompletion.cpp b/Source/Contents/Party/PartyRegistrationCompletion.cpp index 329aa0cb3..d2f12ee4c 100644 --- a/Source/Contents/Party/PartyRegistrationCompletion.cpp +++ b/Source/Contents/Party/PartyRegistrationCompletion.cpp @@ -28,18 +28,20 @@ void CAdventurerAgencyMgr::CompleteRegistration(AsyncDiagnostic diagnostic, std: const int type = root["Type"].asInt(); - if (type == 2 || type == 3) { - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ADVEN_TANKER)), 0xFF, 0, 0, 0); - return; + switch (type) { + case 2: + case 3: + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ADVEN_TANKER)), 0xFF, 0, 0, 0); + return; } this->registered = true; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BASIC_EXP_ZERO)), 0xFFFF64, 0, 0, 0); UIWindow* board = g_windowMgr.LookupWindow(WID_ADVENPARTYBOARDWND); - if (board) { - board->SendMsg(nullptr, UM_COMMAND, ID_PARTY_RELOAD_FIRST_PAGE, 0, 0, 0); - } else { + if (board == nullptr) { g_windowMgr.EnsureWindow(WID_ADVENPARTYBOARDWND); + } else { + board->SendMsg(nullptr, UM_COMMAND, ID_PARTY_RELOAD_FIRST_PAGE, 0, 0, 0); } }