update/filter out false positives in combat log detection

This commit is contained in:
SowinskiBraeden committed 2023-10-08 09:48:57 -07:00
1 parent ece6c267ea
commit 58487a1505
4 files changed
+39 -4

No files matched your search

+2 -2
View File
@@ -41,8 +41,8 @@ module.exports = {
if (diffSeconds > (data.combatLogTimer * 60)) return;
if (data.lastDamageDate <= data.lastDeathDate) return;
// If lastHitBy (attacker) died to this player or another,
// then it does not count as combat logging, (the combat ended)
// If lastHitBy (attacker) died after shooting this player
// then it does not count as combat logging, (the combat ended due to death)
let attacker = guild.playerstats.find(stat => stat.gamertag = data.lastHitBy);
if (attacker.lastDeathDate > data.lastDamageDate) return;