diff --git a/package.json b/package.json index 6a1ba5e..39cc236 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "12.3.10", + "version": "12.3.11", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": { diff --git a/util/KillfeedHandler.js b/util/KillfeedHandler.js index 9c1e6d1..5632875 100644 --- a/util/KillfeedHandler.js +++ b/util/KillfeedHandler.js @@ -195,8 +195,8 @@ module.exports = { victimStat.combatRating = calculateNewCombatRating(victimStat.combatRating, killerStat.combatRating, 0); if (killerStat.combatRating > killerStat.highestCombatRating) killerStat.highestCombatRating = killerStat.combatRating; if (victimStat.combatRating < victimStat.lowestCombatRating) killerStat.lowestCombatRating = victimStat.combatRating; - if (killerStat.combatRatingHistory.length > 12) killerStat.combatRatingHistory = killerStat.combatRatingHistory.slice(1); // Remove first element (limits history to length 12) - if (victimStat.combatRatingHistory.length > 12) victimStat.combatRatingHistory = victimStat.combatRatingHistory.slice(1); // Remove first element (limits history to length 12) + if (killerStat.combatRatingHistory.length >= 12) killerStat.combatRatingHistory = killerStat.combatRatingHistory.slice(1); // Remove first element (limits history to length 12) + if (victimStat.combatRatingHistory.length >= 12) victimStat.combatRatingHistory = victimStat.combatRatingHistory.slice(1); // Remove first element (limits history to length 12) killerStat.combatRatingHistory.push(killerStat.combatRating); victimStat.combatRatingHistory.push(victimStat.combatRating); let kdiff = killerStat.combatRating - killerOldRating;