Remove need for Iteration count, should fix being kicked for AFK
This commit is contained in:
parent
6a3219e12b
commit
e22af4ef15
@ -16,6 +16,7 @@ namespace DumpLib
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.LogInfo("[Dumpy] Starting Dumpy");
|
Utils.LogInfo("[Dumpy] Starting Dumpy");
|
||||||
|
|
||||||
await Task.Factory.StartNew(async delegate
|
await Task.Factory.StartNew(async delegate
|
||||||
@ -49,23 +50,6 @@ namespace DumpLib
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Although there are now no map iterations, use the iterations to "reset" the afk montior
|
|
||||||
if (DataHelper.Iteration > 6)
|
|
||||||
{
|
|
||||||
DataHelper.Iteration = 1;
|
|
||||||
|
|
||||||
var controller = DataHelper.MainMenuController.GetValue(DataHelper.TarkovApp);
|
|
||||||
if (controller != null)
|
|
||||||
{
|
|
||||||
controller.GetType().GetMethod("StopAfkMonitor").Invoke(controller, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils.LogInfo($"[Dumpy] Restarting Loop in {DataHelper.ConfigSettings.SptTimings.AllIterationDelayMs}ms");
|
|
||||||
await Task.Delay(DataHelper.ConfigSettings.SptTimings.AllIterationDelayMs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Utils.LogInfo($"Dumpy iteration number: {DataHelper.Iteration}");
|
|
||||||
foreach (var map in DataHelper.ConfigSettings.MapNames)
|
foreach (var map in DataHelper.ConfigSettings.MapNames)
|
||||||
{
|
{
|
||||||
// Set location in the RaidSettings object
|
// Set location in the RaidSettings object
|
||||||
@ -135,8 +119,14 @@ namespace DumpLib
|
|||||||
await Task.Delay(DataHelper.ConfigSettings.SptTimings.SingleIterationDelayMs);
|
await Task.Delay(DataHelper.ConfigSettings.SptTimings.SingleIterationDelayMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataHelper.Iteration++;
|
var controller = DataHelper.MainMenuController.GetValue(DataHelper.TarkovApp);
|
||||||
|
if (controller != null)
|
||||||
|
{
|
||||||
|
controller.GetType().GetMethod("StopAfkMonitor").Invoke(controller, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Utils.LogInfo($"[Dumpy] Restarting Loop in {DataHelper.ConfigSettings.SptTimings.AllIterationDelayMs}ms");
|
||||||
|
await Task.Delay(DataHelper.ConfigSettings.SptTimings.AllIterationDelayMs);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -208,7 +198,8 @@ namespace DumpLib
|
|||||||
{
|
{
|
||||||
if (reqParams != null)
|
if (reqParams != null)
|
||||||
{
|
{
|
||||||
File.WriteAllText($@"{path}req.{file}\\req.{file}_{time}_{DataHelper.ConfigSettings.Name}.json", JsonConvert.SerializeObject(reqParams));
|
File.WriteAllText($@"{path}req.{file}\\req.{file}_{time}_{DataHelper.ConfigSettings.Name}.json",
|
||||||
|
JsonConvert.SerializeObject(reqParams));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ public static class DataHelper
|
|||||||
|
|
||||||
public static SptConfigClass ConfigSettings = GetSptConfig();
|
public static SptConfigClass ConfigSettings = GetSptConfig();
|
||||||
|
|
||||||
public static int Iteration = 1;
|
|
||||||
public static bool GotBackend = false;
|
public static bool GotBackend = false;
|
||||||
public static object WaveSettings = null;
|
public static object WaveSettings = null;
|
||||||
public static object LocalRaidSettings = null;
|
public static object LocalRaidSettings = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user