mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-08 04:55:47 +08:00
🐛修正数据文件更改带来的报错
This commit is contained in:
parent
edba5ba89b
commit
8bf935843e
@ -154,16 +154,19 @@ async def get_data(char: dict, sr_data: dict, sr_uid: str):
|
||||
extra_ability_temp['extraAbilityLevel'] = behavior['level']
|
||||
status_add = characterSkillTree[str(char['avatarId'])][
|
||||
str(behavior['pointId'])
|
||||
]['levels'][str(behavior['level'])]['status_add']
|
||||
]['levels'][behavior['level'] - 1]['properties']
|
||||
extra_ability_temp['statusAdd'] = {}
|
||||
if status_add != {}:
|
||||
extra_ability_temp['statusAdd']['property'] = status_add[
|
||||
'property'
|
||||
if status_add:
|
||||
for property_ in status_add:
|
||||
extra_ability_temp['statusAdd']['property'] = property_[
|
||||
'type'
|
||||
]
|
||||
extra_ability_temp['statusAdd']['name'] = Property2Name[
|
||||
status_add['property']
|
||||
property_['type']
|
||||
]
|
||||
extra_ability_temp['statusAdd']['value'] = property_[
|
||||
'value'
|
||||
]
|
||||
extra_ability_temp['statusAdd']['value'] = status_add['value']
|
||||
char_data['avatarExtraAbility'].append(extra_ability_temp)
|
||||
|
||||
# 处理技能树中的属性加成
|
||||
@ -173,19 +176,22 @@ async def get_data(char: dict, sr_data: dict, sr_uid: str):
|
||||
attribute_bonus_temp['attributeBonusLevel'] = behavior['level']
|
||||
status_add = characterSkillTree[str(char['avatarId'])][
|
||||
str(behavior['pointId'])
|
||||
]['levels'][str(behavior['level'])]['status_add']
|
||||
]['levels'][behavior['level'] - 1]['properties']
|
||||
attribute_bonus_temp['statusAdd'] = {}
|
||||
if status_add != {}:
|
||||
attribute_bonus_temp['statusAdd']['property'] = status_add[
|
||||
'property'
|
||||
if status_add:
|
||||
for property_ in status_add:
|
||||
attribute_bonus_temp['statusAdd']['property'] = property_[
|
||||
'type'
|
||||
]
|
||||
attribute_bonus_temp['statusAdd']['name'] = Property2Name[
|
||||
status_add['property']
|
||||
property_['type']
|
||||
]
|
||||
attribute_bonus_temp['statusAdd']['value'] = status_add[
|
||||
attribute_bonus_temp['statusAdd']['value'] = property_[
|
||||
'value'
|
||||
]
|
||||
char_data['avatarAttributeBonus'].append(attribute_bonus_temp)
|
||||
char_data['avatarAttributeBonus'].append(
|
||||
attribute_bonus_temp
|
||||
)
|
||||
|
||||
# 处理遗器
|
||||
if char.get('relicList'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user