1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Bugfix in level check

This commit is contained in:
Steffo 2016-08-13 20:06:47 +02:00
parent d67ca94c77
commit 0fa9f583e0

View file

@ -117,13 +117,13 @@ async def league_level_up(timeout):
print("[League] Request rejected for rate limit.")
else:
# Check for level changes
if "level" not in db[player]["league"] or r["level"] > db[player]["league"]["level"]:
if "level" not in db[player]["league"] or r["summonerLevel"] > db[player]["league"]["level"]:
# Send the message
loop.create_task(send_event(eventmsg=s.league_level_up,
player=player,
level=r["level"]))
level=r["summonerLevel"]))
# Update database
db[player]["league"]["level"] = r["level"]
db[player]["league"]["level"] = r["summonerLevel"]
f = open("db.json", "w")
json.dump(db, f)
f.close()