diff --git a/titles/idac/season2.py b/titles/idac/season2.py index 4a6e849..e11b678 100644 --- a/titles/idac/season2.py +++ b/titles/idac/season2.py @@ -588,10 +588,10 @@ class IDACSeason2(IDACBase): user_id, self.version, updated_stock_data ) - def _update_vs_info(self, user_id: int, battle_mode: int, data: Dict) -> Dict: - vs_info = self.data.item.get_vs_infos_by_mode(user_id, battle_mode) - - if vs_info is not None: + def _update_vs_info(self, user_id: int, battle_mode: int, data: Dict) -> Dict: + vs_info = self.data.item.get_vs_infos_by_mode(user_id, battle_mode) + + if vs_info is not None: vs_info["vs_cnt"] += 1 vs_info["vs_win"] = vs_info["vs_win"] + data.get("win_flg") vs_info["invalid"] = vs_info["invalid"] + data.get("result") @@ -600,14 +600,14 @@ class IDACSeason2(IDACBase): vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0 vs_info["break_count"] += data.get("break_count") vs_info["break_penalty_flag"] = data.get("break_penalty_flag") - + course_not_exists = True for course in vs_info["vsinfo_course_data"]: if course["course_id"] == data.get("course_id"): course["vs_cnt"] += 1 course["vs_win"] += data.get("win_flg") course_not_exists = False - + if course_not_exists: course = {} course["course_id"] = data.get("course_id")