From 1ff0e4e2c69fbd23bebdd6ad2278f865f458ba39 Mon Sep 17 00:00:00 2001 From: Midorica Date: Sat, 11 Nov 2023 11:10:57 -0500 Subject: [PATCH] sao: fix episode_play_end again --- titles/sao/base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/titles/sao/base.py b/titles/sao/base.py index 777ff3c..e1c73ef 100644 --- a/titles/sao/base.py +++ b/titles/sao/base.py @@ -520,7 +520,7 @@ class SaoBase: # Grab the rare loot from the table, match it with the right item and then push to the player profile json_data = {"data": []} - for r in range(0,req_data.play_end_request_data_list[0].get_rare_drop_data_list): + for r in range(0,req_data.play_end_request_data_list[0].get_rare_drop_data_count): rewardList = self.game_data.static.get_rare_drop_id(int(req_data.play_end_request_data_list[0].get_rare_drop_data_list[r].quest_rare_drop_id)) commonRewardId = rewardList["commonRewardId"] @@ -537,15 +537,11 @@ class SaoBase: # Generate random hero(es) based off the response for a in range(0,req_data.play_end_request_data_list[0].get_unanalyzed_log_tmp_reward_data_count): - with open('titles/sao/data/RewardTable.csv', 'r') as f: keys_unanalyzed = next(f).strip().split(',') data_unanalyzed = list(DictReader(f, fieldnames=keys_unanalyzed)) randomized_unanalyzed_id = choice(data_unanalyzed) - while int(randomized_unanalyzed_id['UnanalyzedLogGradeId']) != req_data.play_end_request_data_list[0].get_unanalyzed_log_tmp_reward_data_list[a].unanalyzed_log_grade_id: - randomized_unanalyzed_id = choice(data_unanalyzed) - heroList = self.game_data.static.get_hero_id(randomized_unanalyzed_id['CommonRewardId']) equipmentList = self.game_data.static.get_equipment_id(randomized_unanalyzed_id['CommonRewardId']) itemList = self.game_data.static.get_item_id(randomized_unanalyzed_id['CommonRewardId'])