mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-25 18:04:00 +00:00
🐛 修复导入 xlsx 时 uid 为 0, 物品类型都为武器的 bug
This commit is contained in:
parent
e6c25aaa98
commit
333994281e
@ -268,8 +268,10 @@ class GachaLog:
|
|||||||
) -> Tuple[bool, str]:
|
) -> Tuple[bool, str]:
|
||||||
new_num = 0
|
new_num = 0
|
||||||
try:
|
try:
|
||||||
|
if not verify_uid:
|
||||||
|
data["info"]["uid"] = str(client.uid)
|
||||||
uid = data["info"]["uid"]
|
uid = data["info"]["uid"]
|
||||||
if verify_uid and int(uid) != client.uid:
|
if int(uid) != client.uid:
|
||||||
raise GachaLogAccountNotFound
|
raise GachaLogAccountNotFound
|
||||||
# 检查导入数据是否合法
|
# 检查导入数据是否合法
|
||||||
all_items = [GachaItem(**i) for i in data["list"]]
|
all_items = [GachaItem(**i) for i in data["list"]]
|
||||||
|
@ -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:
|
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]
|
name = zh_dict[name]
|
||||||
|
|
||||||
time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S")
|
time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S")
|
||||||
return Qiyr(uigf_gacha_type, item_type, name, time, p, 0)
|
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:
|
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")
|
time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S")
|
||||||
return Qiyr(uigf_gacha_type, item_type, name, time, p, _id)
|
return Qiyr(uigf_gacha_type, item_type, name, time, p, _id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user