diff --git a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs index f92f11ca..16786f60 100644 --- a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs +++ b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs @@ -15,6 +15,8 @@ namespace ReallifeGamemode.Server.Wanted { public class WantedEscapeTimer { + private const int WantedEscapeTime = 300000; + public static Dictionary waTimer { get; set; } = new Dictionary(); //zeit in ms /* public static void WantedTimer() @@ -31,7 +33,7 @@ namespace ReallifeGamemode.Server.Wanted if (user.FactionId == 1 || user.FactionId == 3) return; - waTimer[user.Id] = 300000; + waTimer[user.Id] = WantedEscapeTime; } public static void Timer_Elapsed() @@ -77,9 +79,9 @@ namespace ReallifeGamemode.Server.Wanted user.SetBlipAndNametagColor(); } dbContext.SaveChanges(); + waTimer[user.Id] = WantedEscapeTime; } - - if (!isNearCop) + else if (!isNearCop) waTimer[user.Id] -= 2500; } }