mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 04:37:44 +08:00
Fix: CampaignEnd error when battle function exhausted
This commit is contained in:
@@ -110,8 +110,8 @@ class CampaignBase(CampaignUI, Map, AutoSearchCombat):
|
|||||||
logger.warning('ScriptError, No combat executed.')
|
logger.warning('ScriptError, No combat executed.')
|
||||||
if self.config.Error_HandleError:
|
if self.config.Error_HandleError:
|
||||||
logger.warning('ScriptError, No combat executed, Withdrawing')
|
logger.warning('ScriptError, No combat executed, Withdrawing')
|
||||||
else:
|
|
||||||
self.withdraw()
|
self.withdraw()
|
||||||
|
else:
|
||||||
raise ScriptError('No combat executed.')
|
raise ScriptError('No combat executed.')
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@@ -149,7 +149,10 @@ class CampaignBase(CampaignUI, Map, AutoSearchCombat):
|
|||||||
logger.warning('Battle function exhausted.')
|
logger.warning('Battle function exhausted.')
|
||||||
if self.config.Error_HandleError:
|
if self.config.Error_HandleError:
|
||||||
logger.warning('ScriptError, Battle function exhausted, Withdrawing')
|
logger.warning('ScriptError, Battle function exhausted, Withdrawing')
|
||||||
self.withdraw()
|
try:
|
||||||
|
self.withdraw()
|
||||||
|
except CampaignEnd:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise ScriptError('Battle function exhausted.')
|
raise ScriptError('Battle function exhausted.')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user