Use integer division to generate server population level

This commit is contained in:
Ben 2019-09-09 22:30:53 +01:00
parent 9584ceede2
commit 1908646e25

View File

@ -40,7 +40,7 @@ async def get_server_presence(p, pid):
if server_config['World']:
server_population = await p.server.redis.hget('population', server_config['Id'])
server_population = (7 if int(server_population) == server_config['Capacity']
else int(server_population) / (server_config['Capacity'] / 6)) \
else int(server_population) // (server_config['Capacity'] // 6)) \
if server_population else 0
world_populations.append('{},{}'.format(server_config['Id'], server_population))