This commit is contained in:
xtaodada 2022-09-03 23:25:27 +08:00
parent bf0d6ccdf0
commit a2c1797d6d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -37,9 +37,9 @@ class Player:
self.name = data.get("playerInfo", {}).get("nickname", "")
async def update_char(self):
all_char = await getRawData(self.uid)
all_char = all_char.get("list", [])
for i in all_char:
all_char_ = await getRawData(self.uid)
all_char_ = all_char_.get("list", [])
for i in all_char_:
for f in self.all_char:
if f["name"] == i:
self.all_char.remove(f)
@ -58,7 +58,7 @@ class Player:
except Exception as e:
print(e)
continue
return f"成功缓存了 UID{self.uid}{''.join(all_char)}{len(all_char)} 位角色数据!"
return f"成功缓存了 UID{self.uid}{''.join(all_char_)}{len(all_char_)} 位角色数据!"
def export(self):
return {"name": self.name, "uid": self.uid, "time": int(time.time()), "all_char": self.all_char}