Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-28 15:55:20 +08:00
co-authored by Copilot
parent 07dd632557
commit 76cda54443
6 changed files with 98 additions and 41 deletions
+9 -9
View File
@@ -108,12 +108,12 @@ def trans_to_dcalc_set(detail, alter: AltersDep):
'reinforceType': equ.get('enhance', {}).get('reinforceType', 0),
# 附魔
'enchant': 0,
# 徽章1
'emblem_0': 0,
# 徽章2
'emblem_1': 0,
# # 徽章1
# 'emblem_0': 0,
# # 徽章2
# 'emblem_1': 0,
# 贴膜
'fusion': 0,
# 'fusion': 0,
# 锻造等级
'refine': equ.get('enhance', {}).get('refine', 0),
# 调试等级
@@ -131,8 +131,8 @@ def trans_to_dcalc_set(detail, alter: AltersDep):
# info['fusion'] = dcalcEquFusion.id
info['enchant'] = getEnchatIdByName(equ.get('enchant', ''), equ.get('posName', ''), basic.enchants)
emblems = [getEmblemIdByName(i.get('detail', ''), i.get('categorize', ''), i.get('rarity', ''), basic.emblems) for i in equ.get('emblems', [])]
info['emblem_0'] = emblems[0] if len(emblems) > 0 else 0
info['emblem_1'] = emblems[1] if len(emblems) > 1 else 0
# info['emblem_0'] = emblems[0] if len(emblems) > 0 else 0
# info['emblem_1'] = emblems[1] if len(emblems) > 1 else 0
equips[equ['posName']] = info
avatars = detail.get('avatars', [])
for item in avatars:
@@ -140,8 +140,8 @@ def trans_to_dcalc_set(detail, alter: AltersDep):
'id': '',
'option': '',
'enchant': '',
'emblem_0': '',
'emblem_1': '',
# 'emblem_0': '',
# 'emblem_1': '',
}
list = basicAvatars.get(item.get('posName', ''), [])
if len(list) > 0: