Maintenance: [forced, user-approved] Family G27 (resubmit of 10254 rebased on e235d90a; only conflict was the AsyncWorkMgr.h forward
Batch #10259 by ragnarok-clanker: forced by an admin (1 lower score(s), 11 changed function(s)); checked with 508 compiled unit(s), including every includer of Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Skills/SkillLevelRegistry.h, Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.h, Source/Contents/UserData/CharacterLinkedUserDataMgr.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h. Deletes: Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h
This commit is contained in:
parent
15ee30e2aa
commit
bd0ade90cd
16 changed files with 63 additions and 124 deletions
|
|
@ -1,11 +1,9 @@
|
|||
#include "Client/Session.h"
|
||||
#include "Contents/Async/AsyncWorkMgr.h"
|
||||
#include "Contents/UserData/CharacterConfigLoad.h"
|
||||
#include "Contents/UserData/CharacterLinkedUserDataMgr.h"
|
||||
#include "Contents/Configuration/ServiceOptions.h"
|
||||
#include "Contents/Skills/SkillLevelConfig.h"
|
||||
#include "Contents/Skills/SkillLevelRegistry.h"
|
||||
#include "UI/Shortcuts/NormalItemSlotLoad.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "Utility/Async/AsyncDiagnostic.h"
|
||||
|
||||
#include <json/reader.h>
|
||||
|
|
@ -14,7 +12,7 @@
|
|||
// OFFSET: 0x005E6090
|
||||
// FUNCTION: fn_03927
|
||||
void CCharacterLinkedUserDataMgr::CompleteLoad(
|
||||
AsyncDiagnostic diagnostic, std::uint32_t accountId, std::uint32_t characterId, std::string accountName, std::string response, CharacterConfigLoad& context
|
||||
AsyncDiagnostic diagnostic, std::uint32_t accountId, std::uint32_t characterId, std::string accountName, std::string response
|
||||
) {
|
||||
if (!diagnostic.success) {
|
||||
return;
|
||||
|
|
@ -31,22 +29,21 @@ void CCharacterLinkedUserDataMgr::CompleteLoad(
|
|||
const int type = root["Type"].asInt();
|
||||
|
||||
if (type == 4) {
|
||||
context.registry.Load();
|
||||
LoadSkillUseLevelRegistry();
|
||||
g_session.SetOption(7, 1, 0);
|
||||
g_session.SetOption(8, 1, 0);
|
||||
this->m_loaded = true;
|
||||
} else if (type == 1) {
|
||||
Json::Value& data = root["data"];
|
||||
LoadUseSkillLevels(data, context.useLevels);
|
||||
LoadHomunculusSkillLevels(data, context.homunculusLevels);
|
||||
this->LoadUseSkillLevels(root["data"]);
|
||||
this->LoadHomunculusSkillLevels(root["data"]);
|
||||
|
||||
const Json::Value comparison = data["ItemComparison"];
|
||||
context.serviceOptions.Set(264, comparison.isNull() ? true : comparison.asBool());
|
||||
const Json::Value comparison = root["data"]["ItemComparison"];
|
||||
g_serviceOptions.Set(264, comparison.isNull() ? true : comparison.asBool());
|
||||
|
||||
const Json::Value sorting = data["SortPrivateTab"];
|
||||
context.sortPrivate = sorting.isNull() ? false : sorting.asBool();
|
||||
const Json::Value sorting = root["data"]["SortPrivateTab"];
|
||||
g_sortPrivateTab = sorting.isNull() ? false : sorting.asBool();
|
||||
|
||||
LoadNormalItemSlots(data, context.items, context.saved, context.itemSlotActive, context.windows);
|
||||
this->LoadNormalItemSlots(root["data"]);
|
||||
this->m_loaded = true;
|
||||
}
|
||||
|
||||
|
|
@ -57,14 +54,12 @@ void CCharacterLinkedUserDataMgr::CompleteLoad(
|
|||
|
||||
// OFFSET: 0x005E6E20
|
||||
// FUNCTION: fn_03932
|
||||
void CCharacterLinkedUserDataMgr::Load(
|
||||
std::uint32_t accountId, std::uint32_t characterId, std::string accountName, const char* token16, CAsyncWorkMgr& workManager, CharacterConfigLoad& context
|
||||
) {
|
||||
void CCharacterLinkedUserDataMgr::Load(std::uint32_t accountId, std::uint32_t characterId, std::string accountName) {
|
||||
if (accountId == 0 || characterId == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string token(token16, 16);
|
||||
const std::string token(reinterpret_cast<const char*>(&g_session.unknown_807C[0x08]), 16);
|
||||
const std::string url = this->LoadUrl();
|
||||
workManager.LoadCharacter(accountId, characterId, accountName, url, token, context);
|
||||
g_asyncWorkMgr->LoadCharacter(accountId, characterId, accountName, url, token);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue