Batch #14937 by ragnarok-clanker: no function's compiled code changes; checked with 251 compiled unit(s), including every includer of Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Network/Packets/PartyJoinPacket.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
43 lines
1 KiB
C++
43 lines
1 KiB
C++
#include "Contents/Party/AdventurerAgencyMgr.h"
|
|
#include "UI/Window/UIEnums.h"
|
|
#include "UI/Window/WindowId.h"
|
|
#include "UI/Party/UIAdvenPartyBoardWnd.h"
|
|
#include "UI/Window/WindowManagerWindows.h"
|
|
#include "Utility/Async/AsyncDiagnostic.h"
|
|
|
|
#include <json/reader.h>
|
|
#include <json/value.h>
|
|
|
|
// OFFSET: 0x005CC000
|
|
// FUNCTION: fn_03662
|
|
void CAdventurerAgencyMgr::CompleteList(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows) {
|
|
--this->pending;
|
|
|
|
if (!diagnostic.success) {
|
|
return;
|
|
}
|
|
|
|
Json::Value root;
|
|
Json::Reader reader;
|
|
|
|
if (!reader.parse(response.c_str(), root, true)) {
|
|
return;
|
|
}
|
|
|
|
if (root["Type"].asInt() == 2 || root["Type"].asInt() == 3) {
|
|
return;
|
|
}
|
|
|
|
this->LoadList(root["data"]);
|
|
auto* board = static_cast<UIAdvenPartyBoardWnd*>(windows.EnsureWindow(WID_ADVENPARTYBOARDWND));
|
|
|
|
if (board) {
|
|
const int pages = root.get("totalPage", 0).asInt();
|
|
|
|
if (pages != 0) {
|
|
board->totalPages = pages;
|
|
}
|
|
|
|
board->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0);
|
|
}
|
|
}
|