muffin v7.5.12
This commit is contained in:
parent
3102923ce2
commit
911ed68baa
65 changed files with 2356 additions and 1539 deletions
|
|
@ -209,6 +209,8 @@ internal static class Duty
|
|||
{
|
||||
private long _startMs;
|
||||
|
||||
private bool _runAccepted;
|
||||
|
||||
protected unsafe override bool Start()
|
||||
{
|
||||
if (!territoryData.TryGetContentFinderCondition(base.Task.ContentFinderConditionId, out TerritoryData.ContentFinderConditionData contentFinderConditionData))
|
||||
|
|
@ -240,6 +242,7 @@ internal static class Duty
|
|||
}
|
||||
autoDutyIpc.StartInstance(base.Task.ContentFinderConditionId, base.Task.DutyMode);
|
||||
_startMs = Environment.TickCount64;
|
||||
_runAccepted = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -255,8 +258,15 @@ internal static class Duty
|
|||
}
|
||||
if (!autoDutyIpc.IsStopped())
|
||||
{
|
||||
_runAccepted = true;
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
if (!_runAccepted)
|
||||
{
|
||||
logger.LogError("AutoDuty did not start duty {CfcId} (territory {TerritoryId}) - Run was rejected, check the AutoDuty log [{Installation}]", base.Task.ContentFinderConditionId, contentFinderConditionData.TerritoryId, autoDutyIpc.DescribeInstallation());
|
||||
chatGui.PrintError("AutoDuty did not start the duty (rejected the run), check the AutoDuty log.", "Questionable", 576);
|
||||
return ETaskResult.End;
|
||||
}
|
||||
if (Environment.TickCount64 - _startMs < 10000)
|
||||
{
|
||||
return ETaskResult.StillRunning;
|
||||
|
|
@ -277,7 +287,7 @@ internal static class Duty
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed record WaitAutoDutyTask(uint ContentFinderConditionId) : ITask
|
||||
internal sealed record WaitAutoDutyTask(uint ContentFinderConditionId) : IDutyTask, ITask
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
@ -433,17 +443,7 @@ internal static class Duty
|
|||
{
|
||||
protected override bool Start()
|
||||
{
|
||||
CombatController.CombatData combatData = new CombatController.CombatData
|
||||
{
|
||||
ElementId = null,
|
||||
Sequence = 0,
|
||||
CompletionQuestVariablesFlags = new List<QuestWorkValue>(),
|
||||
SpawnType = EEnemySpawnType.None,
|
||||
KillEnemyDataIds = new List<uint>(),
|
||||
ComplexCombatDatas = new List<ComplexCombatData>(),
|
||||
CombatItemUse = null
|
||||
};
|
||||
if (rsrModule.Start(combatData))
|
||||
if (rsrModule.StartForDuty())
|
||||
{
|
||||
logger.LogDebug("Enabled RSR Henched mode for AutoDuty run");
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue