Fix: Handle None from _obtain_parse()

This commit is contained in:
LmeSzinc 2024-06-04 16:00:48 +08:00
parent 9fd1d76392
commit 87023c77e6

View File

@ -228,14 +228,17 @@ class CombatObtain(PlannerMixin):
self._obtain_enter(entry, appear_button=COMBAT_PREPARE)
item = self._obtain_parse()
if item is not None:
if item.item == KEYWORDS_ITEM_CURRENCY.Trailblaze_EXP:
logger.warning('Trailblaze_EXP is in obtain list, OBTAIN_TRAILBLAZE_EXP may need to verify')
index += 1
prev = item
elif item is not None:
else:
items.append(item)
index += 1
prev = item
else:
index += 1
self._obtain_close(check_button=MAY_OBTAIN)
logger.hr('Obtained Result')