muffin v7.38.7
This commit is contained in:
parent
317800fb39
commit
5e2d8f648b
7 changed files with 703 additions and 486 deletions
|
|
@ -350,26 +350,30 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
_escPressCount = 0;
|
||||
_lastEscPressTime = DateTime.MinValue;
|
||||
}
|
||||
if (_configuration.Stop.Enabled && _configuration.Stop.LevelToStopAfter && _clientState.LocalPlayer != null)
|
||||
if (_configuration.Stop.Enabled && _startedQuest != null)
|
||||
{
|
||||
int level = _clientState.LocalPlayer.Level;
|
||||
if (level >= _configuration.Stop.TargetLevel && IsRunning)
|
||||
string text = _startedQuest.Quest.Id.ToString();
|
||||
if (_configuration.Stop.QuestSequences.TryGetValue(text, out var value) && value.HasValue)
|
||||
{
|
||||
_logger.LogInformation("Reached level stop condition (level: {CurrentLevel}, target: {TargetLevel})", level, _configuration.Stop.TargetLevel);
|
||||
_chatGui.Print($"Reached or exceeded target level {_configuration.Stop.TargetLevel}.", "Questionable", 576);
|
||||
Stop($"Level stop condition reached [{level}]");
|
||||
return;
|
||||
int sequence = _startedQuest.Sequence;
|
||||
if (sequence >= value.Value && IsRunning)
|
||||
{
|
||||
_logger.LogInformation("Reached quest-specific sequence stop condition (quest: {QuestId}, sequence: {CurrentSequence}, target: {TargetSequence})", _startedQuest.Quest.Id, sequence, value.Value);
|
||||
_chatGui.Print($"Quest '{_startedQuest.Quest.Info.Name}' reached sequence {sequence}, configured stop sequence is {value.Value}.", "Questionable", 576);
|
||||
Stop($"Quest-specific sequence stop condition reached [{text}@{sequence}]");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_configuration.Stop.Enabled && _configuration.Stop.SequenceToStopAfter && CurrentQuest != null)
|
||||
{
|
||||
int sequence = CurrentQuest.Sequence;
|
||||
if (sequence >= _configuration.Stop.TargetSequence && IsRunning)
|
||||
else if (_configuration.Stop.SequenceToStopAfter && CurrentQuest != null)
|
||||
{
|
||||
_logger.LogInformation("Reached quest sequence stop condition (sequence: {CurrentSequence}, target: {TargetSequence})", sequence, _configuration.Stop.TargetSequence);
|
||||
_chatGui.Print($"Quest sequence {sequence} reached target sequence {_configuration.Stop.TargetSequence}.", "Questionable", 576);
|
||||
Stop($"Sequence stop condition reached [{sequence}]");
|
||||
return;
|
||||
int sequence2 = CurrentQuest.Sequence;
|
||||
if (sequence2 >= _configuration.Stop.TargetSequence && IsRunning)
|
||||
{
|
||||
_logger.LogInformation("Reached global quest sequence stop condition (sequence: {CurrentSequence}, target: {TargetSequence})", sequence2, _configuration.Stop.TargetSequence);
|
||||
_chatGui.Print($"Quest sequence {sequence2} reached target sequence {_configuration.Stop.TargetSequence}.", "Questionable", 576);
|
||||
Stop($"Sequence stop condition reached [{sequence2}]");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool flag = AutomationType == EAutomationType.Automatic && (_taskQueue.AllTasksComplete || _taskQueue.CurrentTaskExecutor?.CurrentTask is WaitAtEnd.WaitQuestAccepted);
|
||||
|
|
@ -383,14 +387,17 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
if (step == 0 || step == 255)
|
||||
{
|
||||
flag2 = true;
|
||||
goto IL_04f5;
|
||||
goto IL_054c;
|
||||
}
|
||||
}
|
||||
flag2 = false;
|
||||
goto IL_04f5;
|
||||
goto IL_054c;
|
||||
}
|
||||
goto IL_04f9;
|
||||
IL_04f9:
|
||||
goto IL_0550;
|
||||
IL_054c:
|
||||
flag = flag2;
|
||||
goto IL_0550;
|
||||
IL_0550:
|
||||
if (flag && DateTime.Now >= CurrentQuest.StepProgress.StartedAt.AddSeconds(15.0))
|
||||
{
|
||||
lock (_progressLock)
|
||||
|
|
@ -405,10 +412,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
CheckAutoRefreshCondition();
|
||||
UpdateCurrentTask();
|
||||
}
|
||||
return;
|
||||
IL_04f5:
|
||||
flag = flag2;
|
||||
goto IL_04f9;
|
||||
}
|
||||
|
||||
private void CheckAutoRefreshCondition()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue