Fix: Handle popup in synthesize_rarity_set()

This commit is contained in:
LmeSzinc 2024-06-19 12:28:53 +08:00
parent 1f06e7a32a
commit 7ec2523688

View File

@ -9,6 +9,7 @@ from module.exception import ScriptError
from module.logger import logger
from module.ocr.ocr import Digit, Ocr
from tasks.base.page import page_menu, page_synthesize
from tasks.combat.assets.assets_combat_obtain import ITEM_CLOSE
from tasks.combat.obtain import CombatObtain
from tasks.item.assets.assets_item_synthesize import *
from tasks.item.inventory import InventoryManager
@ -178,6 +179,10 @@ class Synthesize(CombatObtain, ItemUI):
self.device.click(SWITCH_RARITY)
switched = True
continue
if self.appear_then_click(ITEM_CLOSE, interval=2):
continue
if self.handle_reward():
continue
return switched