iw4x-client/src/Components/Modules/StructuredData.hpp
Edo c7ae27a664
[Json] Sorround with try/catch (#531)
* [Json] Sorround with try/catch

* Minor format fix
2022-10-16 16:17:42 +01:00

41 lines
904 B
C++

#pragma once
namespace Components
{
class StructuredData : public Component
{
public:
enum PlayerDataType
{
FEATURES,
WEAPONS,
ATTACHEMENTS,
CHALLENGES,
CAMOS,
PERKS,
KILLSTREAKS,
ACCOLADES,
CARDICONS,
CARDTITLES,
CARDNAMEPLATES,
TEAMS,
GAMETYPES,
COUNT
};
StructuredData();
private:
static bool UpdateVersionOffsets(Game::StructuredDataDefSet *set, Game::StructuredDataBuffer *buffer, Game::StructuredDataDef *oldDef);
static void PatchPlayerDataEnum(Game::StructuredDataDef* data, PlayerDataType type, std::vector<std::string>& entries);
static void PatchAdditionalData(Game::StructuredDataDef* data, std::unordered_map<std::string, std::string>& patches);
static void PatchCustomClassLimit(Game::StructuredDataDef* data, int count);
static Utils::Memory::Allocator MemAllocator;
static const char* EnumTranslation[COUNT];
};
}