This commit is contained in:
@@ -103,11 +103,10 @@ void Spoofer::loadConfig()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
json configJson = json::parse(configFile);
|
json configJson = json::parse(configFile);
|
||||||
_config.spoofCharacterOwnership = configJson.value("spoofCharacterOwnership", false);
|
_config.spoofCharacterOwnership =
|
||||||
_config.spoofInventory = configJson.value("spoofInventory", true);
|
configJson.value("spoofCharacterOwnership", _config.spoofCharacterOwnership);
|
||||||
_config.spoofCustomization = configJson.value("spoofCustomization", true);
|
_config.spoofInventory = configJson.value("spoofInventory", _config.spoofInventory);
|
||||||
Log::info("Loaded config: Ownership={}, Inventory={}, Customization={}", _config.spoofCharacterOwnership,
|
_config.spoofCustomization = configJson.value("spoofCustomization", _config.spoofCustomization);
|
||||||
_config.spoofInventory, _config.spoofCustomization);
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@@ -117,11 +116,15 @@ void Spoofer::loadConfig()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log::info("config.json not found, using default settings");
|
Log::info("config.json not found, using default settings");
|
||||||
json defaultConfig = {
|
json defaultConfig = {{"spoofCharacterOwnership", _config.spoofCharacterOwnership},
|
||||||
{"spoofCharacterOwnership", true}, {"spoofInventory", true}, {"spoofCustomization", true}};
|
{"spoofInventory", _config.spoofInventory},
|
||||||
|
{"spoofCustomization", _config.spoofCustomization}};
|
||||||
std::ofstream out(configPath);
|
std::ofstream out(configPath);
|
||||||
out << defaultConfig.dump(4);
|
out << defaultConfig.dump(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log::info("Loaded config: Ownership={}, Inventory={}, Customization={}", _config.spoofCharacterOwnership,
|
||||||
|
_config.spoofInventory, _config.spoofCustomization);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
struct SpooferConfig
|
struct SpooferConfig
|
||||||
{
|
{
|
||||||
bool spoofCharacterOwnership = false;
|
bool spoofCharacterOwnership = false;
|
||||||
bool spoofInventory = false;
|
bool spoofInventory = true;
|
||||||
bool spoofCustomization = false;
|
bool spoofCustomization = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Spoofer
|
class Spoofer
|
||||||
|
|||||||
Reference in New Issue
Block a user