修复:命座数据问题

This commit is contained in:
Wuyi无疑 2022-06-02 11:36:02 +08:00 committed by GitHub
parent 172b4ef263
commit 1c2b80cba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,8 +124,8 @@ async def enkaToData(uid: str, enka_data: Optional[dict] = None) -> dict:
# 处理命座
talent_temp = []
if 'talentIdList' in char:
talentTemp = {}
for index,talent in enumerate(char['talentIdList']):
talentTemp = {}
talentTemp['talentId'] = char['talentIdList'][index]
talentTemp['talentName'] = talentId2Name['Name'][str(talent)]
talentTemp['talentIcon'] = talentId2Name['Icon'][str(talent)]
@ -232,4 +232,4 @@ async def enkaToData(uid: str, enka_data: Optional[dict] = None) -> dict:
with open(path / '{}.json'.format(avatarName),'w', encoding='UTF-8') as file:
json.dump(char_data, file, ensure_ascii=False)
char_name_list_str = ','.join(char_name_list)
return f'UID{uid}刷新成功!刷新角色:{char_name_list_str}'
return f'UID{uid}刷新成功!刷新角色:{char_name_list_str}'