diff --git a/src/MaaCore/Config/GeneralConfig.cpp b/src/MaaCore/Config/GeneralConfig.cpp index 787d736f5f..f2b896d854 100644 --- a/src/MaaCore/Config/GeneralConfig.cpp +++ b/src/MaaCore/Config/GeneralConfig.cpp @@ -5,6 +5,8 @@ bool asst::GeneralConfig::parse(const json::value& json) { + LogTraceFunction; + m_version = json.at("version").as_string(); { diff --git a/src/MaaCore/Config/Miscellaneous/BattleDataConfig.cpp b/src/MaaCore/Config/Miscellaneous/BattleDataConfig.cpp index e5503119e0..8944a78593 100644 --- a/src/MaaCore/Config/Miscellaneous/BattleDataConfig.cpp +++ b/src/MaaCore/Config/Miscellaneous/BattleDataConfig.cpp @@ -6,7 +6,8 @@ bool asst::BattleDataConfig::parse(const json::value& json) { - m_opers.clear(); + LogTraceFunction; + for (const auto& [id, char_data_json] : json.at("chars").as_object()) { battle::OperProps data; data.id = id; @@ -24,7 +25,7 @@ bool asst::BattleDataConfig::parse(const json::value& json) } else { data.role = iter->second; - m_opers.insert(name); // 所有干员名 + m_opers.emplace(name); // 所有干员名 } const auto& ranges_json = char_data_json.at("rangeId").as_array(); diff --git a/src/MaaCore/Config/Miscellaneous/InfrastConfig.cpp b/src/MaaCore/Config/Miscellaneous/InfrastConfig.cpp index 021b39f8b4..8c766db149 100644 --- a/src/MaaCore/Config/Miscellaneous/InfrastConfig.cpp +++ b/src/MaaCore/Config/Miscellaneous/InfrastConfig.cpp @@ -6,6 +6,8 @@ bool asst::InfrastConfig::parse(const json::value& json) { + LogTraceFunction; + for (const json::value& facility : json.at("roomType").as_array()) { std::string facility_name = facility.as_string(); const json::value& facility_json = json.at(facility_name); diff --git a/src/MaaCore/Config/Miscellaneous/RecruitConfig.cpp b/src/MaaCore/Config/Miscellaneous/RecruitConfig.cpp index bb0978f311..4aaf563dcc 100644 --- a/src/MaaCore/Config/Miscellaneous/RecruitConfig.cpp +++ b/src/MaaCore/Config/Miscellaneous/RecruitConfig.cpp @@ -17,6 +17,8 @@ std::string asst::RecruitConfig::get_tag_name(const TagId& id) const noexcept bool asst::RecruitConfig::parse(const json::value& json) { + LogTraceFunction; + clear(); for (const json::value& oper : json.at("operators").as_array()) { diff --git a/src/MaaCore/Config/Miscellaneous/StageDropsConfig.cpp b/src/MaaCore/Config/Miscellaneous/StageDropsConfig.cpp index 6717f8f967..17372c7b23 100644 --- a/src/MaaCore/Config/Miscellaneous/StageDropsConfig.cpp +++ b/src/MaaCore/Config/Miscellaneous/StageDropsConfig.cpp @@ -1,9 +1,13 @@ #include "StageDropsConfig.h" +#include "Utils/Logger.hpp" + #include bool asst::StageDropsConfig::parse(const json::value& json) { + LogTraceFunction; + for (const json::value& stage_json : json.as_array()) { auto drop_infos_opt = stage_json.find("dropInfos"); if (!drop_infos_opt) { // 这种一般是以前的活动关,现在已经关闭了的 diff --git a/src/MaaCore/Config/Roguelike/RoguelikeCopilotConfig.cpp b/src/MaaCore/Config/Roguelike/RoguelikeCopilotConfig.cpp index 1bb9bc58f5..64a17ecd62 100644 --- a/src/MaaCore/Config/Roguelike/RoguelikeCopilotConfig.cpp +++ b/src/MaaCore/Config/Roguelike/RoguelikeCopilotConfig.cpp @@ -18,6 +18,8 @@ std::optional asst::RoguelikeCopilotConfig::get_stage_data(const std bool asst::RoguelikeCopilotConfig::parse(const json::value& json) { + LogTraceFunction; + for (const auto& stage_info : json.as_array()) { std::string stage_name = stage_info.at("stage_name").as_string(); CombatData data; diff --git a/src/MaaCore/Config/Roguelike/RoguelikeRecruitConfig.cpp b/src/MaaCore/Config/Roguelike/RoguelikeRecruitConfig.cpp index 79fef681be..86dcb3d47a 100644 --- a/src/MaaCore/Config/Roguelike/RoguelikeRecruitConfig.cpp +++ b/src/MaaCore/Config/Roguelike/RoguelikeRecruitConfig.cpp @@ -63,6 +63,8 @@ int asst::RoguelikeRecruitConfig::get_group_id(const std::string& theme, const s bool asst::RoguelikeRecruitConfig::parse(const json::value& json) { + LogTraceFunction; + clear(); for (const auto& theme_view : { RoguelikePhantomThemeName, RoguelikeMizukiThemeName }) { const std::string theme(theme_view); diff --git a/src/MaaCore/Config/Roguelike/RoguelikeShoppingConfig.cpp b/src/MaaCore/Config/Roguelike/RoguelikeShoppingConfig.cpp index ac6d55d787..3f709ce417 100644 --- a/src/MaaCore/Config/Roguelike/RoguelikeShoppingConfig.cpp +++ b/src/MaaCore/Config/Roguelike/RoguelikeShoppingConfig.cpp @@ -4,6 +4,8 @@ bool asst::RoguelikeShoppingConfig::parse(const json::value& json) { + LogTraceFunction; + clear(); for (const auto& theme_view : { RoguelikePhantomThemeName, RoguelikeMizukiThemeName }) { diff --git a/src/MaaCore/Config/Roguelike/RoguelikeStageEncounterConfig.cpp b/src/MaaCore/Config/Roguelike/RoguelikeStageEncounterConfig.cpp index 08d97b5567..9a733a64cb 100644 --- a/src/MaaCore/Config/Roguelike/RoguelikeStageEncounterConfig.cpp +++ b/src/MaaCore/Config/Roguelike/RoguelikeStageEncounterConfig.cpp @@ -4,6 +4,8 @@ bool asst::RoguelikeStageEncounterConfig::parse(const json::value& json) { + LogTraceFunction; + m_events.clear(); for (const auto& theme_view : { RoguelikePhantomThemeName, RoguelikeMizukiThemeName }) {