Update DayzArmbands.js

Debug function break to return original stats not null
This commit is contained in:
SowinskiBraeden authored and GitHub committed 2023-03-31 10:50:55 -07:00
1 parent 2ba187d88d
commit 1d4b14a715
1 file changed
+5 -4
+5 -4
View File
@@ -124,6 +124,7 @@ class DayzArmbands extends Client {
let template = /(.*) \| Player \"(.*)\" \(DEAD\) \(id=(.*) pos=<(.*)>\)\[HP\: 0\] hit by Player \"(.*)\" \(id=(.*) pos=<(.*)>\) into (.*) for (.*) damage \((.*)\) with (.*) from (.*) meters /g; let template = /(.*) \| Player \"(.*)\" \(DEAD\) \(id=(.*) pos=<(.*)>\)\[HP\: 0\] hit by Player \"(.*)\" \(id=(.*) pos=<(.*)>\) into (.*) for (.*) damage \((.*)\) with (.*) from (.*) meters /g;
let data = [...line.matchAll(template)][0]; let data = [...line.matchAll(template)][0];
if (!data) return stats;
let info = { let info = {
time: data[1], time: data[1],
@@ -339,7 +340,7 @@ class DayzArmbands extends Client {
if (line.includes(' connected')) { if (line.includes(' connected')) {
let data = [...line.matchAll(connectTemplate)][0]; let data = [...line.matchAll(connectTemplate)][0];
if (!data) return; if (!data) return stats;
let info = { let info = {
time: data[1], time: data[1],
@@ -373,7 +374,7 @@ class DayzArmbands extends Client {
if (line.includes(' disconnected')) { if (line.includes(' disconnected')) {
let data = [...line.matchAll(disconnectTemplate)][0]; let data = [...line.matchAll(disconnectTemplate)][0];
if (!data) return; if (!data) return stats;
let info = { let info = {
time: data[1], time: data[1],
@@ -410,7 +411,7 @@ class DayzArmbands extends Client {
if (line.includes('pos=<')) { if (line.includes('pos=<')) {
let data = [...line.matchAll(positionTemplate)][0]; let data = [...line.matchAll(positionTemplate)][0];
if (!data) return; if (!data) return stats;
let info = { let info = {
time: data[1], time: data[1],
@@ -440,7 +441,7 @@ class DayzArmbands extends Client {
if (line.includes('hit by Player')) { if (line.includes('hit by Player')) {
let data = [...line.matchAll(damangeTemplate)]; let data = [...line.matchAll(damangeTemplate)];
if (!data) return; if (!data) return stats;
let info = { let info = {
time: data[1], time: data[1],