fix:修复部分职业说明不完整的情况

This commit is contained in:
2026-06-12 13:32:36 +08:00
parent 729e08046d
commit 387d97a13f
+6 -1
View File
@@ -21,7 +21,12 @@ def load_skill_tree_with_desc_special(job_id: str, job_grow_id: str) -> list[dic
detail_path = detail_dir / f'{skill_id}.json' detail_path = detail_dir / f'{skill_id}.json'
if detail_path.exists(): if detail_path.exists():
with detail_path.open(encoding='utf-8') as file: with detail_path.open(encoding='utf-8') as file:
desc_special = json.load(file).get('descSpecial') skill_data = json.load(file)
desc_special = skill_data.get('descSpecial')
optionDesc = skill_data.get('levelInfo', {}).get('optionDesc','')
if optionDesc and '压制力' in optionDesc and not any(desc in (desc_special or []) for desc in ['压制', '压制力']):
desc_special = (desc_special or []) + ['压制']
skill['descSpecial'] = desc_special skill['descSpecial'] = desc_special
return skills_data return skills_data