fix: 移除随机购物

This commit is contained in:
status102
2024-01-05 10:28:58 +08:00
parent 0f184a7a01
commit 34a3c030bb
2 changed files with 6 additions and 6 deletions

View File

@@ -12813,7 +12813,7 @@
},
"Roguelike@TraderRandomShopping": {
"Doc": "该任务注册了 RoguelikeShoppingTaskPlugin若是点完了仍在当前界面说明没啥要买的直接离开商店next 里的 PhantomStageTraderLeave",
"action": "ClickSelf",
"action": "DoNothing",
"templThreshold": 0.7,
"cache": false,
"roi": [
@@ -16420,4 +16420,4 @@
"Stop"
]
}
}
}

View File

@@ -95,7 +95,7 @@ bool asst::RoguelikeShoppingTaskPlugin::_run()
}
}
bool bought = false;
//bool bought = false;
auto& all_goods = RoguelikeShopping.get_goods(m_config->get_theme());
std::vector<std::string> all_foldartal = m_config->get_theme() == RoguelikeTheme::Sami
? Task.get<OcrTaskInfo>("Sami@Roguelike@FoldartalGainOcr")->text
@@ -161,7 +161,7 @@ bool asst::RoguelikeShoppingTaskPlugin::_run()
// 然后继续走 next 里确认 or 取消等等的逻辑
Log.info("Ready to buy", goods.name);
ctrler()->click(find_it->rect);
bought = true;
//bought = true;
if (m_config->get_theme() == RoguelikeTheme::Sami) {
auto iter = std::find(all_foldartal.begin(), all_foldartal.end(), goods.name);
@@ -177,11 +177,11 @@ bool asst::RoguelikeShoppingTaskPlugin::_run()
}
break;
}
/*
if (!bought) {
// 如果什么都没买,即使有商品,说明也是不需要买的,这里强制离开商店,后面让 ProcessTask 继续跑
return ProcessTask(*this, { "RoguelikeTraderShoppingOver" }).run();
}
*/
return true;
}