Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
|
|
@ -1,89 +0,0 @@
|
|||
#include "Contents/AdventurerAgencyMgr.h"
|
||||
#include "Contents/LoadPartyInfoAsyncWork.h"
|
||||
#include "Network/CURLPostHander.h"
|
||||
#include "Network/TextEncoding.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <mmsystem.h>
|
||||
|
||||
namespace {
|
||||
constexpr char sourceFile[] =
|
||||
"C:\\repositories\\RagnarokClient\\RagnarokClient\\Contents\\AdventurerAgency\\CLoadPartyInfoAsyncWork.cpp";
|
||||
|
||||
AsyncDiagnostic Diagnostic(bool success, const char* text, std::uint32_t line) {
|
||||
std::string message = text;
|
||||
return AsyncDiagnostic(&success, &message, sourceFile, &line);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x005D0470
|
||||
// FUNCTION: fn_03692
|
||||
CLoadPartyInfoAsyncWork::CLoadPartyInfoAsyncWork()
|
||||
: NAsyncWork("PartyInfo_Load"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, "unknwon", 25)),
|
||||
m_context(nullptr) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x005D0840
|
||||
// FUNCTION: fn_03693
|
||||
CLoadPartyInfoAsyncWork::~CLoadPartyInfoAsyncWork() = default;
|
||||
|
||||
// OFFSET: 0x005D0BB0
|
||||
// FUNCTION: fn_03695
|
||||
void CLoadPartyInfoAsyncWork::Reset() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x005D0930
|
||||
// FUNCTION: fn_03694
|
||||
void CLoadPartyInfoAsyncWork::Bind(
|
||||
std::uint32_t accountId,
|
||||
std::uint32_t characterId,
|
||||
std::string world,
|
||||
std::string url,
|
||||
std::string token,
|
||||
std::uint32_t queryAccountId,
|
||||
PartyInfoContext& context
|
||||
) {
|
||||
this->m_group = timeGetTime();
|
||||
this->m_accountId = accountId;
|
||||
this->m_characterId = characterId;
|
||||
this->m_key = 0;
|
||||
this->m_world = world;
|
||||
this->m_url = url;
|
||||
this->m_token = token;
|
||||
this->m_queryAccountId = queryAccountId;
|
||||
AsyncDiagnostic diagnostic = Diagnostic(false, "unknwon", 52);
|
||||
this->m_diagnostic.MoveFrom(diagnostic);
|
||||
this->m_context = &context;
|
||||
}
|
||||
|
||||
// OFFSET: 0x005D0C80
|
||||
// FUNCTION: fn_03697
|
||||
bool CLoadPartyInfoAsyncWork::Execute() {
|
||||
char account[64] = {};
|
||||
char character[64] = {};
|
||||
char query[64] = {};
|
||||
_snprintf_s(account, sizeof(account), _TRUNCATE, "%lu", static_cast<unsigned long>(this->m_accountId));
|
||||
_snprintf_s(character, sizeof(character), _TRUNCATE, "%lu", static_cast<unsigned long>(this->m_characterId));
|
||||
const std::string world = ToUtf8(this->m_world);
|
||||
_snprintf_s(query, sizeof(query), _TRUNCATE, "%lu", static_cast<unsigned long>(this->m_queryAccountId));
|
||||
CCURLPostHander handler(this->m_url);
|
||||
handler.AddField("AID", account, 4);
|
||||
handler.AddField("GID", character, 4);
|
||||
handler.AddField("AuthToken", this->m_token, 4);
|
||||
handler.AddField("WorldName", world, 4);
|
||||
handler.AddField("QueryAID", query, 4);
|
||||
|
||||
if (handler.Perform() == 0) {
|
||||
this->m_response = FromUtf8(handler.Response());
|
||||
AsyncDiagnostic diagnostic = Diagnostic(true, "success", 97);
|
||||
this->m_diagnostic.MoveFrom(diagnostic);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// OFFSET: 0x005D0BC0
|
||||
// FUNCTION: fn_03696
|
||||
void CLoadPartyInfoAsyncWork::Complete() {
|
||||
g_adventurerAgencyMgr->CompletePartyInfo(this->m_diagnostic, this->m_response, *this->m_context);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue