From 3dd23d4b53a56336946c7bf86a6cb1c15c3a778b Mon Sep 17 00:00:00 2001 From: UncleJim Date: Mon, 8 Jan 2024 03:09:17 +0000 Subject: [PATCH] Added past round event data for season 1 --- titles/idac/season2.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/titles/idac/season2.py b/titles/idac/season2.py index 71109f6..7d5130d 100644 --- a/titles/idac/season2.py +++ b/titles/idac/season2.py @@ -1910,6 +1910,21 @@ class IDACSeason2(IDACBase): "past_season_timetrial_data": past_timetrial_data, } + def handle_user_getpastseasonrounddata_request(self, data: Dict, headers: Dict): + user_id = headers["session"] + season_id = data.get("season_id") + + # so to get the season 1 data just subtract 1 from the season id + past_timetrial_data = self._generate_time_trial_data(season_id - 1, user_id) + + # TODO: get the current season timetrial data somehow, because after requesting + # GetPastSeasonTAData the game will NOT request GetTAData?! + return { + "status_code": "0", + "season_id": season_id, + "past_season_round_event_data": [{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "DAC稼働記念 1stラウンド","round_id": 0},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 2ndラウンド","round_id": 1},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 3rdラウンド","round_id": 2},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 4thラウンド","round_id": 3},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 5thラウンド","round_id": 4},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 6thラウンド","round_id": 5},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 7thラウンド","round_id": 6},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 8thラウンド","round_id": 7},{"count": 0,"win": 0,"rank": 0,"area_rank": 0,"point": 0,"total_round_point": 0,"round_name": "シーズン1 9thラウンド","round_id": 8}] + } + def handle_user_gettadata_request(self, data: Dict, headers: Dict): user_id = headers["session"]