Update index.js

This commit is contained in:
Skillet 2023-03-09 10:48:32 -05:00 committed by GitHub
parent 17deebf4a5
commit aa9efec073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,6 +268,7 @@ export default class SquadServer extends EventEmitter {
});
this.logParser.on('PLAYER_DIED', async (data) => {
console.log(data);
data.victim = await this.getPlayerByName(data.victimName);
if (data.victim && data.attacker)
@ -277,7 +278,9 @@ export default class SquadServer extends EventEmitter {
delete data.victimName;
delete data.attackerName;
console.log(data);
this.emit('PLAYER_DIED', data);
});