diff options
| author | Vainsocial root <root@vainsocial> | 2017-03-24 18:57:22 +0000 |
|---|---|---|
| committer | Vainsocial root <root@vainsocial> | 2017-03-24 18:57:22 +0000 |
| commit | 9388a47c2f9263593f10ce826cb748e4ce56d8c7 (patch) | |
| tree | 4cf4caab510c4c17509b0a8d99a7066dbf7f20bd | |
| parent | fbf08a6c59026957b3b4c3ba13c1450bf697f7bb (diff) | |
| download | meta-9388a47c2f9263593f10ce826cb748e4ce56d8c7.tar.gz meta-9388a47c2f9263593f10ce826cb748e4ce56d8c7.zip | |
use minions killed / min not avg farm
| -rw-r--r-- | minionlivesmatter/templates/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/minionlivesmatter/templates/index.html b/minionlivesmatter/templates/index.html index 2f5aad7..e6b6ee1 100644 --- a/minionlivesmatter/templates/index.html +++ b/minionlivesmatter/templates/index.html @@ -261,9 +261,9 @@ <script type="text/javascript"> - var minions_per_second = {{ sql_val("SELECT SUM(minion_kills)/SUM(match.duration)::FLOAT FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}; + var minions_per_second = {{ sql_val("SELECT SUM(minion_kills)/(24*60*60)::FLOAT FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}; var minions = 0; - // sum(minions killed) / sum(game lengh s) + // sum(minions killed) / (seconds per day) setInterval(() => { minions += minions_per_second; $("#minions-killed-now").text(Math.floor(minions)); |
