forked from Dniel97/artemis
Update titles/idac/season2.py
This commit is contained in:
parent
df9ba9beda
commit
4d5823a4f7
@ -588,10 +588,10 @@ class IDACSeason2(IDACBase):
|
|||||||
user_id, self.version, updated_stock_data
|
user_id, self.version, updated_stock_data
|
||||||
)
|
)
|
||||||
|
|
||||||
def _update_vs_info(self, user_id: int, battle_mode: int, data: Dict) -> Dict:
|
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)
|
vs_info = self.data.item.get_vs_infos_by_mode(user_id, battle_mode)
|
||||||
|
|
||||||
if vs_info is not None:
|
if vs_info is not None:
|
||||||
vs_info["vs_cnt"] += 1
|
vs_info["vs_cnt"] += 1
|
||||||
vs_info["vs_win"] = vs_info["vs_win"] + data.get("win_flg")
|
vs_info["vs_win"] = vs_info["vs_win"] + data.get("win_flg")
|
||||||
vs_info["invalid"] = vs_info["invalid"] + data.get("result")
|
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["lose_now"] += 1 if data.get("win_flg") == 0 else 0
|
||||||
vs_info["break_count"] += data.get("break_count")
|
vs_info["break_count"] += data.get("break_count")
|
||||||
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
||||||
|
|
||||||
course_not_exists = True
|
course_not_exists = True
|
||||||
for course in vs_info["vsinfo_course_data"]:
|
for course in vs_info["vsinfo_course_data"]:
|
||||||
if course["course_id"] == data.get("course_id"):
|
if course["course_id"] == data.get("course_id"):
|
||||||
course["vs_cnt"] += 1
|
course["vs_cnt"] += 1
|
||||||
course["vs_win"] += data.get("win_flg")
|
course["vs_win"] += data.get("win_flg")
|
||||||
course_not_exists = False
|
course_not_exists = False
|
||||||
|
|
||||||
if course_not_exists:
|
if course_not_exists:
|
||||||
course = {}
|
course = {}
|
||||||
course["course_id"] = data.get("course_id")
|
course["course_id"] = data.get("course_id")
|
||||||
|
Loading…
Reference in New Issue
Block a user