Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyJiangWJ committed Jul 15, 2020
2 parents ff366af + 846dbf6 commit 1f7c9cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions core/BaseScanner.js
Expand Up @@ -2,7 +2,7 @@
* @Author: TonyJiangWJ
* @Date: 2019-12-18 14:17:09
* @Last Modified by: TonyJiangWJ
* @Last Modified time: 2020-06-17 19:03:47
* @Last Modified time: 2020-07-16 00:57:19
* @Description: 排行榜扫描基类
*/
let { config: _config } = require('../config.js')(runtime, this)
Expand Down Expand Up @@ -383,19 +383,19 @@ const BaseScanner = function () {
}

this.protectInfoDetect = function (name) {
let usingInfo = _widgetUtils.widgetGetOne(_config.using_protect_content, 50, true, true)
let usingInfo = _widgetUtils.widgetGetOne(_config.using_protect_content, 500, true, true)
if (usingInfo !== null) {
let target = usingInfo.target
let usingTime = null
debugInfo(['found using protect info, bounds:{}', target.bounds()], true)
let parent = target.parent().parent()
let targetRow = parent.row()
let time = parent.child(1).text()
let time = parent.child(2).text()
if (!time) {
time = parent.child(1).desc()
time = parent.child(2).desc()
}
let isToday = true
let yesterday = _widgetUtils.widgetGetOne('昨天|Yesterday', 50, true, true)
let yesterday = _widgetUtils.widgetGetOne('昨天|Yesterday', 1000, true, true)
let yesterdayRow = null
if (yesterday !== null) {
yesterdayRow = yesterday.target.row()
Expand Down Expand Up @@ -524,6 +524,12 @@ const BaseScanner = function () {
}
}

if (collectEnergy === 0 && !obj.isHelp) {
// 没有收集到能量,可能有保护罩,等待2秒
warnInfo(['非帮助收集,未收集到能量,可能当前好友使用了保护罩,等待2秒'], true)
sleep(2000)
}

if (friendGrowEnergy > 0) {
this.collect_any = true
logInfo("帮助好友:" + obj.name + " 回收能量 " + friendGrowEnergy + "g")
Expand Down
2 changes: 1 addition & 1 deletion project.json
Expand Up @@ -4,7 +4,7 @@
"ignore": [
"build"
],
"versionName": "1.3.0.6.9.2",
"versionName": "1.3.0.6.10",
"packageName": "com.tony.ant.forest",
"versionCode": 1
}
2 changes: 1 addition & 1 deletion test/MockDetect.js
Expand Up @@ -2,7 +2,7 @@
* @Author: TonyJiangWJ
* @Date: 2020-05-12 20:33:18
* @Last Modified by: TonyJiangWJ
* @Last Modified time: 2020-05-13 10:07:39
* @Last Modified time: 2020-07-16 00:53:34
* @Description:
*/
runtime.loadDex('../lib/color-region-center.dex')
Expand Down

0 comments on commit 1f7c9cf

Please sign in to comment.