From f0515a21300b19eb472f6381c407ec4b231aa121 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Thu, 27 Jun 2024 23:24:12 -0400 Subject: [PATCH] sao: fix quest failing to save --- titles/sao/base.py | 8 ++++---- titles/sao/frontend.py | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/titles/sao/base.py b/titles/sao/base.py index a589778..44a7801 100644 --- a/titles/sao/base.py +++ b/titles/sao/base.py @@ -1230,7 +1230,7 @@ class SaoBase: if current_data: await self.data.item.put_player_quest( user_id, - QuestType.EPISODE, + int(QuestType.EPISODE), ep_data['QuestSceneId'], False if not quest_clear_flag and not current_data['quest_clear_flag'] else True, min(clear_time, current_data['clear_time']) if quest_clear_flag else current_data['clear_time'], @@ -1241,7 +1241,7 @@ class SaoBase: else: await self.data.item.put_player_quest( user_id, - QuestType.EPISODE, + int(QuestType.EPISODE), ep_data['QuestSceneId'], quest_clear_flag, clear_time, @@ -1458,7 +1458,7 @@ class SaoBase: if current_data: await self.data.item.put_player_quest( user_id, - QuestType.TRIAL_TOWER, + int(QuestType.TRIAL_TOWER), ep_data['QuestSceneId'], False if not quest_clear_flag and not current_data['quest_clear_flag'] else True, min(clear_time, current_data['clear_time']) if quest_clear_flag else current_data['clear_time'], @@ -1469,7 +1469,7 @@ class SaoBase: else: await self.data.item.put_player_quest( user_id, - QuestType.TRIAL_TOWER, + int(QuestType.TRIAL_TOWER), ep_data['QuestSceneId'], quest_clear_flag, clear_time, diff --git a/titles/sao/frontend.py b/titles/sao/frontend.py index 401257f..f9264fc 100644 --- a/titles/sao/frontend.py +++ b/titles/sao/frontend.py @@ -257,8 +257,6 @@ class SaoFrontend(FE_Base): return RedirectResponse("/game/sao/?e=97", 303) await self.data.item.put_hero_party(usr_sesh.user_id, 0, hero1, hero2, hero3) - # await self.data.item.put_player_quest(usr_sesh.user_id, 1001, True, 300, 0, 0, 1) - # Force the tutorial stage to be completed due to potential crash in-game self.logger.info(f"Web registered User {usr_sesh.user_id} profile {profile_id} with name {name}") return RedirectResponse("/game/sao/?s=1", 303) \ No newline at end of file