Explorar o código

!2 fix fight bear

pcacc hai 3 semanas
pai
achega
5929473496
Modificáronse 2 ficheiros con 4 adicións e 8 borrados
  1. 3 6
      app_dongri.py
  2. 1 2
      dongri_task.py

+ 3 - 6
app_dongri.py

@@ -286,10 +286,7 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
     if len(collectArr) == 1:
         collectArr = collectArr[0]
     while not event.is_set():
-        #config = read_Dailycfg()
-        #print("config, check daily", config)
-        
-        if isSimple == False and is_within_n_minutes(get_todo_time("巨熊行动"), 20, 30):
+        if isSimple == False and is_within_n_minutes(get_todo_time("巨熊行动"), 30, 35):
             print("in fight bear")
             if len(task_queue) < 5:
                 start_recording()
@@ -311,8 +308,8 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
         elif isSimple == False and is_within_n_minutes(get_todo_time("巨熊行动"), 60, 0):
             # 设置无尽运行和启动的游戏为0
             always = True
-            #if g_switch:
-                #update_rungame_type(0)
+            if g_switch:
+                update_rungame_type(0)
             send_status(f'巨熊行动:在60min内,切换到无尽模式')
         stop_recording()
         

+ 1 - 2
dongri_task.py

@@ -66,14 +66,13 @@ def get_todo_msgList():
 
 def get_todo_time(todo_str):
     global todo_list
-
     for item in todo_list:
         if item['item'] == todo_str:
             return item['time']
     return None
 
 def is_within_n_minutes(target_time_str, n_minutes_left, n_minutes_right):
-    if target_time_str == None:
+    if target_time_str == None or type(target_time_str) is not str:
         return False
     # 获取当前时间
     now = datetime.now()