reset wanted escape timer when abtauchen

This commit is contained in:
hydrant
2021-04-11 14:17:50 +02:00
parent fd2a6fd84e
commit 4ec4875701

View File

@@ -15,6 +15,8 @@ namespace ReallifeGamemode.Server.Wanted
{
public class WantedEscapeTimer
{
private const int WantedEscapeTime = 300000;
public static Dictionary<int, int> waTimer { get; set; } = new Dictionary<int, int>(); //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;
}
}