diff --git a/modules/apihelper/gacha_log.py b/modules/apihelper/gacha_log.py index a47f295..30ae6bb 100644 --- a/modules/apihelper/gacha_log.py +++ b/modules/apihelper/gacha_log.py @@ -268,8 +268,10 @@ class GachaLog: ) -> Tuple[bool, str]: new_num = 0 try: + if not verify_uid: + data["info"]["uid"] = str(client.uid) uid = data["info"]["uid"] - if verify_uid and int(uid) != client.uid: + if int(uid) != client.uid: raise GachaLogAccountNotFound # 检查导入数据是否合法 all_items = [GachaItem(**i) for i in data["list"]] diff --git a/plugins/genshin/gacha/gacha_log.py b/plugins/genshin/gacha/gacha_log.py index 8305e1f..7043660 100644 --- a/plugins/genshin/gacha/gacha_log.py +++ b/plugins/genshin/gacha/gacha_log.py @@ -130,14 +130,14 @@ class GachaLog(Plugin.Conversation, BasePlugin.Conversation): } def from_paimon_moe(uigf_gacha_type: UIGFGachaType, item_type: str, name: str, time: str, p: int) -> Qiyr: - item_type = ItemType.CHARACTER if type == "Character" else ItemType.WEAPON + item_type = ItemType.CHARACTER if item_type == "Character" else ItemType.WEAPON name = zh_dict[name] time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S") return Qiyr(uigf_gacha_type, item_type, name, time, p, 0) def from_fxq(uigf_gacha_type: UIGFGachaType, item_type: str, name: str, time: str, p: int, _id: int) -> Qiyr: - item_type = ItemType.CHARACTER if type == "角色" else ItemType.WEAPON + item_type = ItemType.CHARACTER if item_type == "角色" else ItemType.WEAPON time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S") return Qiyr(uigf_gacha_type, item_type, name, time, p, _id)