rodecomp/Source/Contents/Party/AgencyRequests.cpp
ragnarok-clanker 8b3ba20b56 Maintenance: [forced, user-approved] Family G9: remove the adventurer-agency bundle family: AgencyRequestContext, StopRecruitingConte
Batch #10208 by ragnarok-clanker: forced by an admin (10 lower score(s), 42 changed function(s)); checked with 119 compiled unit(s), including every includer of Source/Client/ModeBaseEvents.h, Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Configuration/ServiceConfiguration.h, Source/Contents/Party/AdventurerAgencyMgr.h, Source/Contents/Party/LoadPartyInfoAsyncWork.h, Source/Contents/Party/PartyJoinResult.h, Source/Contents/Party/RegisterPartyAsyncWork.h, Source/Contents/Party/StopRecruitingAsyncWork.h, Source/UI/Party/UIAdvenPartyBoardWnd.h, Source/UI/Party/UIApplyForPartyWnd.h, Source/UI/Party/UIPartyInfoWnd.h, Source/UI/Party/UIRegisterPartyWnd.h, Source/Contents/Party/AgencyRequestContext.h.
Deletes: Source/Contents/Party/AgencyRequestContext.h
2026-11-02 22:46:30 +00:00

102 lines
4.3 KiB
C++

#include "Client/Session.h"
#include "Contents/Party/AdventurerAgencyMgr.h"
#include "Contents/Async/AsyncWorkMgr.h"
#include "UI/Window/UIWindowMgr.h"
// OFFSET: 0x005CB3B0
// FUNCTION: fn_03657
void CAdventurerAgencyMgr::RequestChangeMaster(std::uint32_t targetAccountId, std::uint32_t targetCharacterId, std::string targetName) {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(6);
const std::string world(g_session.m_accountName.c_str());
g_asyncWorkMgr->ChangePartyMaster(
account, character, std::string(g_session.DecodePlayerName()), targetAccountId, targetCharacterId, targetName, world, url, token, g_windowMgr
);
++this->pending;
}
// OFFSET: 0x005CB710
// FUNCTION: fn_03659
void CAdventurerAgencyMgr::RequestMyParty() {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(5);
g_asyncWorkMgr->LoadMyParty(account, character, std::string(g_session.m_accountName.c_str()), url, token, g_windowMgr);
++this->pending;
}
// OFFSET: 0x005CBEE0
// FUNCTION: fn_03661
void CAdventurerAgencyMgr::RequestList(int page) {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
CAdvenPartyInfo filter;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(1);
g_asyncWorkMgr->LoadPartyList(account, character, std::string(g_session.m_accountName.c_str()), url, token, 0, filter, page, g_windowMgr);
++this->pending;
}
// OFFSET: 0x005CC290
// FUNCTION: fn_03663
void CAdventurerAgencyMgr::RequestInfo(std::uint32_t queryAccountId) {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(7);
g_asyncWorkMgr->LoadPartyInfo(account, character, std::string(g_session.m_accountName.c_str()), url, token, queryAccountId);
++this->pending;
}
// OFFSET: 0x005CCC00
// FUNCTION: fn_03665
void CAdventurerAgencyMgr::RequestRegistration(const CAdvenPartyInfo& info) {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
const CAdvenPartyInfo registration(info);
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(0);
g_asyncWorkMgr->RegisterParty(account, character, std::string(g_session.m_accountName.c_str()), url, token, registration);
++this->pending;
}
// OFFSET: 0x005CCF80
// FUNCTION: fn_03667
void CAdventurerAgencyMgr::RequestSearch(const CAdvenPartyInfo& filter, int page) {
const std::uint32_t account = g_session.m_aid;
const std::uint32_t character = g_session.m_gid;
const CAdvenPartyInfo search(filter);
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(3);
g_asyncWorkMgr->LoadPartyList(account, character, std::string(g_session.m_accountName.c_str()), url, token, 1, search, page, g_windowMgr);
++this->pending;
}
// OFFSET: 0x005CD340
// FUNCTION: fn_03669
void CAdventurerAgencyMgr::RequestStop(std::uint32_t masterAccountId) {
this->unknown_0008 = masterAccountId;
const std::uint32_t account = g_session.m_aid;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(4);
g_asyncWorkMgr->StopRecruiting(account, std::string(g_session.m_accountName.c_str()), url, token, masterAccountId);
++this->pending;
}
// OFFSET: 0x005CD440
// FUNCTION: fn_03670
void CAdventurerAgencyMgr::RequestStop() {
if (!this->registered) {
return;
}
this->unknown_0008 = g_session.m_aid;
const std::uint32_t account = g_session.m_aid;
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[8]), 16);
const std::string url = this->ServiceUrl(4);
g_asyncWorkMgr->StopRecruiting(account, std::string(g_session.m_accountName.c_str()), url, token, account);
++this->pending;
}