|
@@ -30,6 +30,7 @@ isReset = False
|
|
|
g_times = 0
|
|
|
g_cureNum = 500
|
|
|
g_switch = False
|
|
|
+g_isRestart = True
|
|
|
|
|
|
@app.after_request
|
|
|
def add_no_cache_header(response):
|
|
@@ -255,7 +256,7 @@ def auto_palace():
|
|
|
|
|
|
|
|
|
def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False, activity = 'None', isAutoParticipate = True, isDailyConfig = False, train_type = 'None', always = False):
|
|
|
- global g_times, g_cureNum, g_switch
|
|
|
+ global g_times, g_cureNum, g_switch, g_isRestart
|
|
|
collectArr = [int(x) for x in isMaxCollect.split(",")]
|
|
|
print("collectArr", collectArr)
|
|
|
while not event.is_set():
|
|
@@ -390,11 +391,13 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
|
|
|
if g_switch:
|
|
|
restart_times = 4
|
|
|
if g_times == restart_times:
|
|
|
+ if g_isRestart:
|
|
|
+ handle_end_game()
|
|
|
if always:
|
|
|
myTimeSleep(random.randint(350, 400), send_status)
|
|
|
else:
|
|
|
- handle_end_game()
|
|
|
myTimeSleep(random.randint(1000, 2000), send_status)
|
|
|
+ if g_isRestart:
|
|
|
handle_restart_game()
|
|
|
else:
|
|
|
if isAddStrengh:
|
|
@@ -539,7 +542,7 @@ def handle_auto(data):
|
|
|
auto_task(config)
|
|
|
|
|
|
def auto_task(data):
|
|
|
- global autoTask, g_cureNum
|
|
|
+ global autoTask, g_cureNum,g_isRestart
|
|
|
if data == None:
|
|
|
isMaxCollect = '4,3,2,1'
|
|
|
isSimple = False
|
|
@@ -553,8 +556,7 @@ def auto_task(data):
|
|
|
cureNumber = 500
|
|
|
lineCheck = False
|
|
|
switch = False
|
|
|
-
|
|
|
-
|
|
|
+ g_isRestart = True
|
|
|
else:
|
|
|
isMaxCollect = data['maxCollect']
|
|
|
isSimple = data['simple']
|
|
@@ -568,6 +570,7 @@ def auto_task(data):
|
|
|
cureNumber = data['cureNumber']
|
|
|
lineCheck = data['lineCheck']
|
|
|
switch = data['switch']
|
|
|
+ g_isRestart = data['is_restart']
|
|
|
|
|
|
g_cureNum = cureNumber
|
|
|
g_switch = switch
|