From 84b44d2a02c86077cf2df7a45026df83c0ab74ab Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sun, 12 Nov 2023 19:55:10 -0500 Subject: [PATCH] sao: add logging to synthesize_enhancement_equipment --- titles/sao/base.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/titles/sao/base.py b/titles/sao/base.py index 628478b..4e520c7 100644 --- a/titles/sao/base.py +++ b/titles/sao/base.py @@ -326,11 +326,19 @@ class SaoBase: if equipmentList: equipment_data = self.game_data.item.get_user_equipment(req_data.user_id, x.user_common_reward_id) + if equipment_data is None: + self.logger.error(f"Failed to find equipment {x.user_common_reward_id} for user {req_data.user_id}!") + continue + equipment_exp = int(equipment_data["enhancement_exp"]) + int(synthesize_equipment_data["enhancement_exp"]) self.game_data.item.remove_equipment(req_data.user_id, x.user_common_reward_id) if heroList: hero_data = self.game_data.item.get_hero_log(req_data.user_id, x.user_common_reward_id) + if hero_data is None: + self.logger.error(f"Failed to find hero {x.user_common_reward_id} for user {req_data.user_id}!") + continue + equipment_exp = int(hero_data["log_exp"]) + int(synthesize_equipment_data["enhancement_exp"]) self.game_data.item.remove_hero_log(req_data.user_id, x.user_common_reward_id)