From e3ebdb7daead2fad3dedd597123fd355d2b14273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E8=90=BD?= <34079036+jiluoQAQ@users.noreply.github.com> Date: Mon, 19 Jun 2023 18:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E4=B8=8A?= =?UTF-8?q?=E6=9C=9F=E6=A8=A1=E6=8B=9F=E5=AE=87=E5=AE=99=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20(#62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StarRailUID/sruid_utils/api/mys/models.py | 1 + StarRailUID/starrailuid_rogue/draw_rogue_card.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/StarRailUID/sruid_utils/api/mys/models.py b/StarRailUID/sruid_utils/api/mys/models.py index dc2be60..ead206f 100644 --- a/StarRailUID/sruid_utils/api/mys/models.py +++ b/StarRailUID/sruid_utils/api/mys/models.py @@ -121,6 +121,7 @@ class RogueData(TypedDict): role: RoleInfo basic_info: RogueBasicInfo current_record: RogueRecord + last_record: RogueRecord ################ diff --git a/StarRailUID/starrailuid_rogue/draw_rogue_card.py b/StarRailUID/starrailuid_rogue/draw_rogue_card.py index 29c9ea7..878bc34 100644 --- a/StarRailUID/starrailuid_rogue/draw_rogue_card.py +++ b/StarRailUID/starrailuid_rogue/draw_rogue_card.py @@ -195,7 +195,7 @@ async def draw_rogue_img( qid: Union[str, int], uid: str, floor: Optional[int] = None, - schedule_type: str = '1', + schedule_type: str = '3', ) -> Union[bytes, str]: # 获取Cookies data = GsCookie() @@ -203,7 +203,7 @@ async def draw_rogue_img( # if retcode: # return retcode # raw_data = data.raw_data - raw_rogue_data = await data.get_rogue_data(uid, schedule_type) + raw_rogue_data = await data.get_rogue_data(uid, '3') # print(raw_rogue_data) if isinstance(raw_rogue_data, int): @@ -217,7 +217,10 @@ async def draw_rogue_img( # char_temp = {} # 计算背景图尺寸 - rogue_detail = raw_rogue_data['current_record']['records'] + if schedule_type == '3': + rogue_detail = raw_rogue_data['current_record']['records'] + else: + rogue_detail = raw_rogue_data['last_record']['records'] # 记录打的宇宙列表 detail_list = []