diff --git a/simnet/client/base.py b/simnet/client/base.py index ea8001f..adab195 100644 --- a/simnet/client/base.py +++ b/simnet/client/base.py @@ -78,8 +78,8 @@ class BaseClient(AsyncContextManager["BaseClient"]): self.client = AsyncClient(cookies=cookies, timeout=timeout) self.region = region self.lang = lang - self.device_id = device_id - self.device_fp = device_fp + self.device_id = device_id or cookies.get("x-rpc-device_id", None) + self.device_fp = device_fp or cookies.get("x-rpc-device_fp", None) @property def cookies(self) -> Cookies: diff --git a/simnet/models/starrail/character.py b/simnet/models/starrail/character.py index a8a5dca..504e9b4 100644 --- a/simnet/models/starrail/character.py +++ b/simnet/models/starrail/character.py @@ -19,12 +19,6 @@ class StarRailPartialCharacter(StarRailBaseCharacter): rank: int -class FloorCharacter(StarRailBaseCharacter): - """Character in a floor.""" - - level: int - - class RogueCharacter(StarRailBaseCharacter): """Rogue character model.""" diff --git a/simnet/models/starrail/chronicle/challenge.py b/simnet/models/starrail/chronicle/challenge.py index c573dd0..4fc6b96 100644 --- a/simnet/models/starrail/chronicle/challenge.py +++ b/simnet/models/starrail/chronicle/challenge.py @@ -4,7 +4,7 @@ from typing import List from pydantic import Field from simnet.models.base import APIModel -from simnet.models.starrail.character import FloorCharacter +from simnet.models.starrail.character import RogueCharacter from .base import PartialTime @@ -15,7 +15,7 @@ class FloorNode(APIModel): """Node for a floor.""" challenge_time: PartialTime - avatars: List[FloorCharacter] + avatars: List[RogueCharacter] class StarRailFloor(APIModel): @@ -27,6 +27,8 @@ class StarRailFloor(APIModel): node_1: FloorNode node_2: FloorNode is_chaos: bool + is_fast: bool + maze_id: int class StarRailChallenge(APIModel):