refactoring

This commit is contained in:
SowinskiBraeden committed 2023-09-10 19:01:03 -07:00
1 parent 924f64cf00
commit b1e2ecfb2c
4 files changed
+8 -11

No files matched your search

+2 -3
View File
@@ -109,6 +109,7 @@ module.exports = {
lastDamageDate: playerStat.lastDamageDate,
lastHitBy: playerStat.lastHitBy,
lastDeathDate: playerStat.lastDeathDate,
combatLogTimer: combatLogTimer,
});
}
}
@@ -169,9 +170,7 @@ module.exports = {
let playerStatIndex = stats.indexOf(playerStat);
if (playerStat === undefined) playerStat = client.getDefaultPlayerStats(info.player, info.playerID);
const newDt = await client.getDateEST(info.time);
playerStat.lastDamageDate = newDt;
playerStat.lastDamageDate = await client.getDateEST(info.time);
playerStat.lastHitBy = info.attacker;
if (playerStatIndex === -1) stats.push(playerStat);