restrict deaths_while_equipped for weapons and player routes

This commit is contained in:
2023-04-21 12:11:37 +02:00
parent 49ff74b315
commit c1d5b6a05a
+1 -1
View File
@@ -114,7 +114,7 @@ router.get(
if (index === 'attacker_id') if (index === 'attacker_id')
data[requestIndex].username = e.attacker_name data[requestIndex].username = e.attacker_name
if (index === 'servername') data[requestIndex].host = e.host if (index === 'servername') data[requestIndex].host = e.host
if (index === 'cause_of_death' || (req.query.weapon && !req.query.weapon.toString().startsWith('!'))) if (index === 'cause_of_death' || (req.query.weapon && !req.query.weapon.toString().startsWith('!') && index === 'attacker_id'))
data[requestIndex].deaths_while_equipped = data[requestIndex].deaths_while_equipped =
Number(e.deaths_with_weapon) + Number(e.deaths_with_weapon) +
(data[requestIndex].deaths_while_equipped || 0) (data[requestIndex].deaths_while_equipped || 0)