muffin v7.4.9
This commit is contained in:
parent
a9e1cdc5f1
commit
2df81c5d15
5 changed files with 5320 additions and 4932 deletions
|
|
@ -322,11 +322,17 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
{
|
||||
StopAllDueToConditionFailed("Logged out");
|
||||
}
|
||||
bool flag;
|
||||
if (_condition[ConditionFlag.Unconscious])
|
||||
{
|
||||
if ((!_condition[ConditionFlag.Unconscious] || !_condition[ConditionFlag.SufferingStatusAffliction63] || _clientState.TerritoryType != 1052) && !(_taskQueue.CurrentTaskExecutor is Duty.WaitAutoDutyExecutor) && !_taskQueue.AllTasksComplete)
|
||||
if (!_condition[ConditionFlag.Unconscious] || !_condition[ConditionFlag.SufferingStatusAffliction63] || _clientState.TerritoryType != 1052)
|
||||
{
|
||||
StopAllDueToConditionFailed("HP = 0");
|
||||
ITaskExecutor currentTaskExecutor = _taskQueue.CurrentTaskExecutor;
|
||||
flag = ((currentTaskExecutor is Duty.WaitAutoDutyExecutor || currentTaskExecutor is Duty.WaitLevelingModeExecutor) ? true : false);
|
||||
if (!flag && !_taskQueue.AllTasksComplete)
|
||||
{
|
||||
StopAllDueToConditionFailed("HP = 0");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_configuration.General.UseEscToCancelQuesting)
|
||||
|
|
@ -410,7 +416,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
}
|
||||
}
|
||||
bool flag = AutomationType == EAutomationType.Automatic && (_taskQueue.AllTasksComplete || _taskQueue.CurrentTaskExecutor?.CurrentTask is WaitAtEnd.WaitQuestAccepted);
|
||||
flag = AutomationType == EAutomationType.Automatic && (_taskQueue.AllTasksComplete || _taskQueue.CurrentTaskExecutor?.CurrentTask is WaitAtEnd.WaitQuestAccepted);
|
||||
bool flag2;
|
||||
if (flag)
|
||||
{
|
||||
|
|
@ -421,14 +427,14 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
if (step == 0 || step == 255)
|
||||
{
|
||||
flag2 = true;
|
||||
goto IL_07e7;
|
||||
goto IL_0800;
|
||||
}
|
||||
}
|
||||
flag2 = false;
|
||||
goto IL_07e7;
|
||||
goto IL_0800;
|
||||
}
|
||||
goto IL_07eb;
|
||||
IL_07eb:
|
||||
goto IL_0804;
|
||||
IL_0804:
|
||||
if (flag && DateTime.Now >= CurrentQuest.StepProgress.StartedAt.AddSeconds(15.0))
|
||||
{
|
||||
lock (_progressLock)
|
||||
|
|
@ -444,9 +450,9 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
UpdateCurrentTask();
|
||||
}
|
||||
return;
|
||||
IL_07e7:
|
||||
IL_0800:
|
||||
flag = flag2;
|
||||
goto IL_07eb;
|
||||
goto IL_0804;
|
||||
}
|
||||
|
||||
private void CheckAutoRefreshCondition()
|
||||
|
|
@ -527,7 +533,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
private bool HasWaitingTasks()
|
||||
{
|
||||
ITask task = _taskQueue.CurrentTaskExecutor?.CurrentTask;
|
||||
if (task is WaitAtEnd.WaitObjectAtPosition || task is WaitAtEnd.WaitForCompletionFlags)
|
||||
if (task is WaitAtEnd.WaitObjectAtPosition || task is WaitAtEnd.WaitForCompletionFlags || task is Duty.StartLevelingModeTask || task is Duty.WaitLevelingModeTask)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -551,7 +557,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
|
||||
private bool HasSystemConditionsPreventingRefresh()
|
||||
{
|
||||
if (_movementController.IsNavmeshReady && !_condition[ConditionFlag.InCombat] && !_condition[ConditionFlag.Unconscious] && !_condition[ConditionFlag.BoundByDuty] && !_condition[ConditionFlag.InDeepDungeon] && !_condition[ConditionFlag.WatchingCutscene] && !_condition[ConditionFlag.WatchingCutscene78] && !_condition[ConditionFlag.BetweenAreas] && !_condition[ConditionFlag.BetweenAreas51] && !_gameFunctions.IsOccupied() && !_movementController.IsPathfinding && !_movementController.IsPathRunning)
|
||||
if (_movementController.IsNavmeshReady && !_condition[ConditionFlag.InCombat] && !_condition[ConditionFlag.Unconscious] && !_condition[ConditionFlag.BoundByDuty] && !_condition[ConditionFlag.InDutyQueue] && !_condition[ConditionFlag.InDeepDungeon] && !_condition[ConditionFlag.WatchingCutscene] && !_condition[ConditionFlag.WatchingCutscene78] && !_condition[ConditionFlag.BetweenAreas] && !_condition[ConditionFlag.BetweenAreas51] && !_gameFunctions.IsOccupied() && !_movementController.IsPathfinding && !_movementController.IsPathRunning)
|
||||
{
|
||||
return DateTime.Now < _safeAnimationEnd;
|
||||
}
|
||||
|
|
@ -652,13 +658,20 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
if (elementId == null || elementId.Value == 0)
|
||||
{
|
||||
ITask task = _taskQueue.CurrentTaskExecutor?.CurrentTask;
|
||||
bool flag = ((task is Duty.StartLevelingModeTask || task is Duty.WaitLevelingModeTask) ? true : false);
|
||||
if (flag || _taskQueue.RemainingTasks.Any((ITask t) => (t is Duty.StartLevelingModeTask || t is Duty.WaitLevelingModeTask) ? true : false))
|
||||
{
|
||||
DebugState = "Leveling mode active";
|
||||
return;
|
||||
}
|
||||
(bool isLevelLocked, int levelsNeeded, int requiredLevel, string? questName) msqLevelLockInfo = _questFunctions.GetMsqLevelLockInfo();
|
||||
bool item = msqLevelLockInfo.isLevelLocked;
|
||||
int item2 = msqLevelLockInfo.levelsNeeded;
|
||||
int item3 = msqLevelLockInfo.requiredLevel;
|
||||
string item4 = msqLevelLockInfo.questName;
|
||||
int currentPlayerLevel = (_objectTable[0] as IPlayerCharacter)?.Level ?? 0;
|
||||
if (item && _autoDutyIpc.IsConfiguredToRunLevelingMode(currentPlayerLevel) && AutomationType == EAutomationType.Automatic && !_condition[ConditionFlag.BoundByDuty] && _taskQueue.AllTasksComplete)
|
||||
if (item && _autoDutyIpc.IsConfiguredToRunLevelingMode(currentPlayerLevel) && AutomationType == EAutomationType.Automatic && !_condition[ConditionFlag.BoundByDuty] && !_condition[ConditionFlag.InDutyQueue] && _taskQueue.AllTasksComplete)
|
||||
{
|
||||
_logger.LogInformation("MSQ '{QuestName}' requires level {RequiredLevel}, current level is {CurrentLevel} ({LevelsNeeded} levels needed). Starting AutoDuty Leveling mode.", item4, item3, item3 - item2, item2);
|
||||
_taskQueue.Enqueue(new Duty.StartLevelingModeTask(item3, item4));
|
||||
|
|
@ -748,6 +761,13 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
if (questProgress == null)
|
||||
{
|
||||
ITask task = _taskQueue.CurrentTaskExecutor?.CurrentTask;
|
||||
bool flag = ((task is Duty.StartLevelingModeTask || task is Duty.WaitLevelingModeTask) ? true : false);
|
||||
if (flag || _taskQueue.RemainingTasks.Any((ITask t) => (t is Duty.StartLevelingModeTask || t is Duty.WaitLevelingModeTask) ? true : false))
|
||||
{
|
||||
DebugState = "Leveling mode active";
|
||||
return;
|
||||
}
|
||||
DebugState = "No quest active";
|
||||
Stop("No quest active");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue