From 21af001dd4581aa18f20e752fc3202611f8f8860 Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 28 Mar 2025 17:00:19 +0000 Subject: [PATCH] Fixed normal scavs giving incorrect xp on death --- .../Assets/database/bots/types/assault.json | 4 ++-- Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Assets/Assets/database/bots/types/assault.json b/Libraries/SPTarkov.Server.Assets/Assets/database/bots/types/assault.json index 65e58290..7174dfaf 100644 --- a/Libraries/SPTarkov.Server.Assets/Assets/database/bots/types/assault.json +++ b/Libraries/SPTarkov.Server.Assets/Assets/database/bots/types/assault.json @@ -2140,8 +2140,8 @@ "min": -1 }, "normal": { - "max": 20, - "min": 20 + "max": -1, + "min": -1 } }, "standingForKill": { diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs index 6ea1b503..5bb9788a 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs @@ -328,6 +328,14 @@ public class BotGenerator( return _randomUtil.GetInt(experiences["normal"].Min, experiences["normal"].Max); } + // Some bots have -1/-1, shortcut result + + + if (result.Max == -1) + { + return -1; + } + return _randomUtil.GetInt(result.Min, result.Max); }