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