Skip to content

Commit

Permalink
修复F面阶段颜色字典IndexError; 修复web_operation中未引入who_am_i造成web操作无法通知到群
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfBleu committed May 23, 2023
1 parent 026e011 commit f19c01d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/ybplugins/clan_battle/components/realize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,10 @@ def challenger_info(self, group_id):
this_boss_data['is_next']
))
level_cycle = self._level_by_cycle(group.boss_cycle, group.game_server)
try:
_bg_color = [(132, 1, 244), (115, 166, 231), (206, 105, 165), (206, 80, 66), (181, 105, 206)][level_cycle]
except IndexError:
_bg_color = (181, 105, 206)
process_image = get_process_image(
[
GroupStateBlock(
Expand All @@ -1431,7 +1435,7 @@ def challenger_info(self, group_id):
data_text=chr(65+level_cycle),
title_color=(255, 255, 255),
data_color=(255, 255, 255),
background_color=[(132, 1, 244), (115, 166, 231), (206, 105, 165), (206, 80, 66), (181, 105, 206)][level_cycle],
background_color=_bg_color,
),
],
{"补偿": half_challenge_list}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ...ybdata import Clan_group, Clan_member, User
from ..exception import ClanBattleError
from ..util import pcr_datetime
from .multi_cq_utils import who_am_i

_logger = logging.getLogger(__name__)

Expand Down

0 comments on commit f19c01d

Please sign in to comment.