From 1ef36c8210ce34e137046429369d8f8302c7a1e4 Mon Sep 17 00:00:00 2001
From: Evan Shimizu
Date: Sat, 24 Feb 2018 17:33:26 -0500
Subject: [PATCH] hotfix for parser takedown attribution error
---
package.json | 2 +-
parser/parser.js | 3 +--
templates/about-page.html | 2 ++
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package.json b/package.json
index 6ac6b9c..e002998 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "stats-of-the-storm",
- "version": "0.1.1",
+ "version": "0.1.2",
"main": "main.js",
"description": "A Heroes of the Storm stat tracking application.",
"bugs": "falindrith@gmail.com",
diff --git a/parser/parser.js b/parser/parser.js
index 95d8638..d5c864b 100644
--- a/parser/parser.js
+++ b/parser/parser.js
@@ -480,7 +480,7 @@ function processReplay(file, opts = {}) {
}
else if (entry.m_key === "KillingPlayer") {
let tdo = {};
- if (entry.m_value === 0 || entry.m_value === 11 || entry.m_value === 12) {
+ if (!(entry.m_value in playerIDMap)) {
// this poor person died to a creep
tdo.player = "0";
tdo.hero = "Nexus Forces"
@@ -489,7 +489,6 @@ function processReplay(file, opts = {}) {
tdo = { player: playerIDMap[entry.m_value], hero: players[playerIDMap[entry.m_value]].hero };
}
-
killers.push(playerIDMap[entry.m_value]);
tData.killers.push(tdo);
}
diff --git a/templates/about-page.html b/templates/about-page.html
index 3a3e004..cd6a9e3 100644
--- a/templates/about-page.html
+++ b/templates/about-page.html
@@ -16,6 +16,8 @@
Change Log
+
+ Parser: Corrected an issue where kills were incorrectly attributed to "Nexus Forces" (and also corrected an occasional crash).
Teams: Corrected issue where players could not be added to teams with the Add Player button.