fix
This commit is contained in:
parent
f701796839
commit
b9400b571e
@ -147,7 +147,7 @@ async def enkaToData(uid: str) -> Optional[str]:
|
||||
else:
|
||||
weapon_info['weaponAffix'] = 1
|
||||
weapon_info['weaponStats'] = []
|
||||
for k in weapon_data['flat']['weaponStats']:
|
||||
for k in weapon_data['flat'].get("weaponStats", {}):
|
||||
weapon_prop_temp = {}
|
||||
weapon_prop_temp['appendPropId'] = k['appendPropId']
|
||||
weapon_prop_temp['statName'] = propId2Name[k['appendPropId']]
|
||||
@ -179,11 +179,11 @@ async def enkaToData(uid: str) -> Optional[str]:
|
||||
artifact_temp['aritifactStar'] = artifact['flat']['rankLevel']
|
||||
artifact_temp['aritifactLevel'] = artifact['reliquary']['level'] - 1
|
||||
|
||||
artifact_temp['reliquaryMainstat'] = artifact['flat']['reliquaryMainstat']
|
||||
artifact_temp['reliquaryMainstat'] = artifact['flat'].get("reliquaryMainstat", {})
|
||||
artifact_temp['reliquaryMainstat']['statName'] = propId2Name[
|
||||
artifact_temp['reliquaryMainstat']['mainPropId']]
|
||||
|
||||
artifact_temp['reliquarySubstats'] = artifact['flat']['reliquarySubstats']
|
||||
artifact_temp['reliquarySubstats'] = artifact['flat'].get("reliquarySubstats", {})
|
||||
for sub in artifact_temp['reliquarySubstats']:
|
||||
sub['statName'] = propId2Name[sub['appendPropId']]
|
||||
artifacts_info.append(artifact_temp)
|
||||
|
Loading…
Reference in New Issue
Block a user