fix: 修复肉鸽及自动战斗数据不清空导致的一些乱七八糟的问题

This commit is contained in:
MistEO
2022-12-26 00:17:19 +08:00
parent a46cc505ab
commit f535400efe
6 changed files with 41 additions and 12 deletions

View File

@@ -30,6 +30,7 @@ asst::BattleProcessTask::BattleProcessTask(const AsstCallback& callback, Assista
bool asst::BattleProcessTask::_run()
{
LogTraceFunction;
clear();
if (!calc_tiles_info(m_stage_name)) {
Log.error("get stage info failed");
@@ -47,6 +48,15 @@ bool asst::BattleProcessTask::_run()
return true;
}
void asst::BattleProcessTask::clear()
{
BattleHelper::clear();
m_combat_data = decltype(m_combat_data)();
m_oper_in_group.clear();
m_in_bullet_time = false;
}
bool asst::BattleProcessTask::set_stage_name(const std::string& stage_name)
{
LogTraceFunction;