Skip to content

Commit

Permalink
<jx3>[feat]fix calculator of wufang
Browse files Browse the repository at this point in the history
  • Loading branch information
HornCopper committed Sep 7, 2024
1 parent e54e71b commit 203aaf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/jx3/calculator/online_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async def analyze_equip_list(self) -> Union[list, Literal[False]]:
)
]
)
] if "WPermanentEnchant" in equip else self.convert_to_dict(PermanentEnchant()),
] if "WPermanentEnchant" in equip else [PermanentEnchant()],
commonEnchant=CommonEnchant(
name=str(enchant_mapping(equip["Quality"])) + "·伤·" + "帽衣腰腕鞋"[["帽子", "上衣", "腰带", "护臂", "鞋"].index(equip["Icon"]["SubKind"])]
) if equip["Icon"]["SubKind"] in ["帽子", "上衣", "腰带", "护臂", "鞋"] else CommonEnchant(),
Expand Down Expand Up @@ -320,7 +320,7 @@ async def format_jx3api(self) -> Union[dict, Literal[False]]:
kungfu_name = await self.get_kungfu(self.tl_data["data"]["Kungfu"]["KungfuID"]) # type: ignore
panel_data = await self.get_panel()
for equip in equip_data:
if equip["permanentEnchant"] == self.convert_to_dict(PermanentEnchant()):
if equip["permanentEnchant"] == [self.convert_to_dict(PermanentEnchant())]:
equip.pop("permanentEnchant")
if equip["commonEnchant"] == CommonEnchant().__dict__:
equip.pop("commonEnchant")
Expand Down

0 comments on commit 203aaf7

Please sign in to comment.