mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:07:36 +08:00
Fix: CampaignEnd error when battle function exhausted
This commit is contained in:
parent
3691fd95cd
commit
8b0964ebfd
@ -110,8 +110,8 @@ class CampaignBase(CampaignUI, Map, AutoSearchCombat):
|
||||
logger.warning('ScriptError, No combat executed.')
|
||||
if self.config.Error_HandleError:
|
||||
logger.warning('ScriptError, No combat executed, Withdrawing')
|
||||
else:
|
||||
self.withdraw()
|
||||
else:
|
||||
raise ScriptError('No combat executed.')
|
||||
|
||||
return result
|
||||
@ -149,7 +149,10 @@ class CampaignBase(CampaignUI, Map, AutoSearchCombat):
|
||||
logger.warning('Battle function exhausted.')
|
||||
if self.config.Error_HandleError:
|
||||
logger.warning('ScriptError, Battle function exhausted, Withdrawing')
|
||||
self.withdraw()
|
||||
try:
|
||||
self.withdraw()
|
||||
except CampaignEnd:
|
||||
pass
|
||||
else:
|
||||
raise ScriptError('Battle function exhausted.')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user