diff --git a/module/event/campaign_abcd.py b/module/event/campaign_abcd.py index a8a0a5135..a01cdfb1c 100644 --- a/module/event/campaign_abcd.py +++ b/module/event/campaign_abcd.py @@ -3,6 +3,7 @@ import os from module.config.config import TaskEnd from module.config.utils import get_server_last_update from module.event.base import STAGE_FILTER, EventBase, EventStage +from module.exception import ScriptEnd, RequestHumanTakeover from module.logger import logger @@ -45,6 +46,18 @@ class CampaignABCD(EventBase): except TaskEnd: # Catch task switch pass + except ScriptEnd as e: + # Raise from CampaignUI.ensure_campaign_ui() + if str(e) == 'Campaign name error': + task = self.config.task.command + logger.critical( + f'Cannot find stage "{stage}". ' + f'Task "{task}" is for 3X daily PT, if you have not unlock {stage}, ' + f'you should use task "Event" to unlock it instead of using task "{task}"') + raise RequestHumanTakeover + else: + raise + if self.run_count > 0: with self.config.multi_set(): self.config.EventDaily_LastStage = stage