diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-12 15:25:22 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-12 15:25:22 +0200 |
| commit | 6f142a3243f37bf0b732a87ebe8e92583daf3cff (patch) | |
| tree | e26b643029c0efef840131655a1b698d94278065 /worker.js | |
| parent | 8ce9983be962e364fcd9755a710b4543a67fe3ff (diff) | |
| parent | 61aba3f4b552432dad20a3bf3765452a18dc15e3 (diff) | |
| download | shrinker-6f142a3243f37bf0b732a87ebe8e92583daf3cff.tar.gz shrinker-6f142a3243f37bf0b732a87ebe8e92583daf3cff.zip | |
Merge branch 'release/2.0.0' of https://gitlab.com/vainglorygame/processor into release/2.0.0
Diffstat (limited to 'worker.js')
| -rw-r--r-- | worker.js | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -421,8 +421,7 @@ function snakeCaseKeys(obj) { ["api_id", "shard_id", "player_api_id", "roster_api_id", "winner", "went_afk", "first_afk_time", "skin_key", "skill_tier", "level", - "karma_level", "actor", - "farm"].map((attr) => + "karma_level", "actor"].map((attr) => p[attr] = participant[attr]); // attributes to copy from API to participant_stats @@ -431,12 +430,12 @@ function snakeCaseKeys(obj) { "jungle_kills", "non_jungle_minion_kills", "crystal_mine_captures", "gold_mine_captures", "kraken_captures", "turret_captures", - "gold"].map((attr) => + "gold", "farm"].map((attr) => p_s[attr] = participant[attr]); // traits calculations if (roster.hero_kills == 0) p_s.kill_participation = 0; - else p_s.kill_participation = p_s.kills / roster.hero_kills; + else p_s.kill_participation = (p_s.kills + p_s.assists) / roster.hero_kills; p_s.sustain_score = participant.items.reduce((score, item) => { // items[], itemGrants{}, itemUse{}, itemSells{} are the API objects |
