feat: 肉鸽模式支持设置开始次数、投资次数、投满停止

This commit is contained in:
MistEO
2022-07-23 01:05:18 +08:00
parent dedd186a0f
commit 8cbd7f2c79
14 changed files with 215 additions and 55 deletions

View File

@@ -0,0 +1,28 @@
#include "RoguelikeControlTaskPlugin.h"
bool asst::RoguelikeControlTaskPlugin::verify(AsstMsg msg, const json::value& details) const
{
if (msg != AsstMsg::SubTaskExtraInfo
|| details.get("subtask", std::string()) != "ProcessTask") {
return false;
}
const std::string what = details.get("what", std::string());
if (what != "ExceededLimit") {
return false;
}
const std::string task = details.at("details").at("task").as_string();
if (task == "Roguelike1Start" ||
task == "Roguelike1StageTraderInvestConfirm" ||
task == "Roguelike1StageTraderInvestSystemFull") {
return true;
}
return false;
}
bool asst::RoguelikeControlTaskPlugin::_run()
{
m_task_ptr->set_enable(false);
return true;
}