add Checkpoint Update Sani
This commit is contained in:
@@ -149,7 +149,7 @@ namespace ReallifeGamemode.Server.Factions.Medic
|
||||
activeDecision.dTarget.Health = 100;
|
||||
activeDecision.dTarget.SendNotification($"Du wurdest von ~g~{activeDecision.dMedic.Name} ~s~ für ~g~{activeDecision.dPrice.ToMoneyString()} geheilt", false);
|
||||
activeDecision.dMedic.SendNotification($"Du hast ~g~{activeDecision.dTarget.Name} ~s~ für {activeDecision.dPrice.ToMoneyString()} geheilt", false);
|
||||
delHealTask(activeDecision.dTarget);
|
||||
delHealTask(activeDecision.dTarget);
|
||||
}
|
||||
HealDecisions.Remove(activeDecision);
|
||||
}
|
||||
@@ -161,7 +161,7 @@ namespace ReallifeGamemode.Server.Factions.Medic
|
||||
DateTime actualTime = DateTime.Now;
|
||||
foreach (var task in ReviveTasks)
|
||||
{
|
||||
if (task.MedicName != null)
|
||||
if (task.MedicName != "none")
|
||||
{
|
||||
var taskTimeLeft = Math.Abs((int)(((DateTimeOffset)actualTime).ToUnixTimeSeconds() - ((DateTimeOffset)task.Time).ToUnixTimeSeconds() - reviveTaskTime));
|
||||
task.TimeLeft = taskTimeLeft;
|
||||
@@ -172,6 +172,23 @@ namespace ReallifeGamemode.Server.Factions.Medic
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateHealTaskCheckpoint()
|
||||
{
|
||||
if (HealTasks.Count != 0)
|
||||
{
|
||||
foreach(var task in HealTasks)
|
||||
{
|
||||
if(task.MedicName != "none")
|
||||
{
|
||||
var medic = PlayerService.GetPlayerByNameOrId(task.MedicName);
|
||||
var victim = PlayerService.GetPlayerByNameOrId(task.Victim);
|
||||
task.Position = victim.Position;
|
||||
medic.TriggerEvent("updateHealCheckpoint", victim.Position.X, victim.Position.Y, victim.Position.Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[RemoteEvent("loadMedicTasks")]
|
||||
public void LoadMedicTasks(Player player, int type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user