更新
This commit is contained in:
parent
ffc5013cae
commit
06e2fae5cc
@ -4,6 +4,14 @@
|
||||
|
||||
# CHANGE
|
||||
|
||||
## 0.7.2
|
||||
|
||||
2022年11月22日
|
||||
|
||||
### 修改
|
||||
|
||||
- 修复光速跑路错误
|
||||
|
||||
## 0.7.1
|
||||
|
||||
2022年11月15日
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wuhu-torn-helper",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"description": "芜湖助手",
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -61,21 +61,28 @@ export default class AttackHelper extends WuhuBase {
|
||||
|
||||
new MutationObserver((_, observer) => {
|
||||
let btnList = document.querySelectorAll('div[class^="dialogButtons___"] button') as NodeListOf<HTMLButtonElement>;
|
||||
|
||||
if (btnList.length === 0) {
|
||||
if (this.currentStage === FIGHT_STAGE.READY && WuhuConfig.get('quickFinishAtt') === 3) {
|
||||
document.body.classList.remove('wh-move-btn');
|
||||
Log.info('移除body class wh-move-btn');
|
||||
observer.disconnect();
|
||||
}
|
||||
// 错误或正在打
|
||||
this.currentStage = FIGHT_STAGE.IN_PROGRESS_OR_ERROR;
|
||||
Log.info('[attackHelper] currentStage', this.currentStage);
|
||||
return;
|
||||
}
|
||||
btnList.forEach(btn => {
|
||||
if (btn.innerText.toLowerCase().includes('start')) {
|
||||
let btnText = btn.innerText.toLowerCase();
|
||||
if (btnText.includes('start') || btnText.includes('join')) {
|
||||
// 开始
|
||||
this.quickStartFight();
|
||||
} else if (btn.innerText.toLowerCase().includes('continue')) {
|
||||
} else if (btnText.includes('continue')) {
|
||||
// 结束end
|
||||
this.currentStage = FIGHT_STAGE.END;
|
||||
observer.disconnect();
|
||||
} else if (btn.innerText.toLowerCase().includes('leave')) {
|
||||
} else if (btnText.includes('leave')) {
|
||||
// 无意识状态FINISHED
|
||||
this.quickFinishFight(btnList);
|
||||
}
|
||||
@ -265,7 +272,11 @@ export default class AttackHelper extends WuhuBase {
|
||||
} else {
|
||||
this.currentStage = FIGHT_STAGE.FINISHED;
|
||||
}
|
||||
if (WuhuConfig.get('quickFinishAtt') === 3) return;
|
||||
if (WuhuConfig.get('quickFinishAtt') === 3) {
|
||||
document.body.classList.remove('wh-move-btn');
|
||||
Log.info('移除body class wh-move-btn');
|
||||
return;
|
||||
}
|
||||
const user_btn_select = ['leave', 'mug', 'hosp'][WuhuConfig.get('quickFinishAtt')];
|
||||
// const wrap = document.querySelector('#react-root');
|
||||
Log.info('光速跑路选项选中:', user_btn_select);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user