Batch #10264 by ragnarok-clanker: forced by an admin (2 lower score(s), 29 changed function(s)); checked with 511 compiled unit(s), including every includer of Source/Client/Session.h, Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Hotkeys/EmotionHotkeys.h, Source/Contents/UserData/AccountLinkedUserDataLoadAsyncWork.h, Source/Contents/UserData/AccountLinkedUserDataMgr.h, Source/Contents/UserData/CharacterLinkedUserDataMgr.h, Source/Contents/UserData/NormalItemSlots.h, Source/Client/ModeBaseEvents.h, Source/Contents/UserData/AccountConfigLoad.h, Source/Contents/UserData/CharacterConfigSave.h. Deletes: Source/Client/ModeBaseEvents.h, Source/Contents/UserData/AccountConfigLoad.h, Source/Contents/UserData/CharacterConfigSave.h
51 lines
1.7 KiB
C++
51 lines
1.7 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_USERDATA_CHARACTERLINKEDUSERDATAMGR_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_USERDATA_CHARACTERLINKEDUSERDATAMGR_H
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
class LuaScript;
|
|
struct AsyncDiagnostic;
|
|
namespace Json {
|
|
class Value;
|
|
}
|
|
class CAsyncWorkMgr;
|
|
|
|
class CCharacterLinkedUserDataMgr {
|
|
public:
|
|
CCharacterLinkedUserDataMgr();
|
|
virtual ~CCharacterLinkedUserDataMgr();
|
|
static bool Initialize();
|
|
static void Shutdown();
|
|
std::string LoadUrl() const;
|
|
std::string SaveUrl() const;
|
|
void CompleteSave();
|
|
void CompleteLoad(AsyncDiagnostic diagnostic, std::uint32_t accountId, std::uint32_t characterId, std::string accountName, std::string response);
|
|
void Load(std::uint32_t accountId, std::uint32_t characterId, std::string accountName);
|
|
void LoadUseSkillLevels(Json::Value& data);
|
|
void LoadHomunculusSkillLevels(Json::Value& data);
|
|
void LoadNormalItemSlots(Json::Value& data);
|
|
void Save();
|
|
void ExportNormalItemSlots(Json::Value& data);
|
|
void RefreshUrls(LuaScript& script, const char* host, const char* port, const char* overrideKey);
|
|
void Reset(LuaScript& script, const char* host, const char* port, const char* overrideKey);
|
|
|
|
protected:
|
|
/* 0004 */ bool m_enabled;
|
|
/* 0008 */ std::uint32_t m_accountId;
|
|
/* 000C */ std::uint32_t m_characterId;
|
|
/* 0010 */ std::string m_accountName;
|
|
/* 0028 */ bool m_loaded;
|
|
/* 002C */ std::uint32_t m_pendingSaves;
|
|
/* 0030 */ std::string m_saveUrl;
|
|
/* 0048 */ std::string m_loadUrl;
|
|
};
|
|
|
|
extern CCharacterLinkedUserDataMgr* g_characterLinkedUserDataMgr;
|
|
extern bool g_sortPrivateTab;
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CCharacterLinkedUserDataMgr) == 96);
|
|
#endif
|
|
|
|
#endif
|