forked from Dniel97/artemis
idac: added battle gift event time check
This commit is contained in:
parent
66114238a5
commit
c397e4b764
@ -318,6 +318,15 @@ class IDACSeason2(IDACBase):
|
|||||||
"story_type": special_story_type,
|
"story_type": special_story_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
battle_gift_event = []
|
||||||
|
if self.battle_gift_event:
|
||||||
|
# check if battle gift event time is valid
|
||||||
|
start_dt = self.battle_gift_event.get("start_dt", 0)
|
||||||
|
end_dt = self.battle_gift_event.get("end_dt", 0)
|
||||||
|
|
||||||
|
if start_dt < int(datetime.now().timestamp()) < end_dt:
|
||||||
|
battle_gift_event = [self.battle_gift_event]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"status_code": "0",
|
"status_code": "0",
|
||||||
"free_continue_enable": 1,
|
"free_continue_enable": 1,
|
||||||
@ -344,9 +353,7 @@ class IDACSeason2(IDACBase):
|
|||||||
"domain_echo1": f"{self.core_cfg.server.hostname}:{self.game_config.server.echo1}",
|
"domain_echo1": f"{self.core_cfg.server.hostname}:{self.game_config.server.echo1}",
|
||||||
"domain_echo2": f"{self.core_cfg.server.hostname}:{self.game_config.server.echo1}",
|
"domain_echo2": f"{self.core_cfg.server.hostname}:{self.game_config.server.echo1}",
|
||||||
"domain_ping": f"{self.core_cfg.server.hostname}",
|
"domain_ping": f"{self.core_cfg.server.hostname}",
|
||||||
"battle_gift_event_master": (
|
"battle_gift_event_master": battle_gift_event,
|
||||||
[self.battle_gift_event] if self.battle_gift_event else []
|
|
||||||
),
|
|
||||||
# online battle round event
|
# online battle round event
|
||||||
"round_event": self.round_event,
|
"round_event": self.round_event,
|
||||||
"last_round_event": self.last_round_event,
|
"last_round_event": self.last_round_event,
|
||||||
|
Loading…
Reference in New Issue
Block a user