Skip most of the framework update logic if no quest is running and quest window isn't visible
This commit is contained in:
parent
86964dd6f9
commit
c0c2e324bb
@ -146,6 +146,8 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
|
||||
|
||||
public string? DebugState { get; private set; }
|
||||
|
||||
public Func<bool> IsQuestWindowOpen { private get; set; } = () => true;
|
||||
|
||||
public void Reload()
|
||||
{
|
||||
lock (_progressLock)
|
||||
@ -181,6 +183,9 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
|
||||
}
|
||||
}
|
||||
|
||||
if (AutomationType == EAutomationType.Manual && !IsRunning && !IsQuestWindowOpen())
|
||||
return;
|
||||
|
||||
UpdateCurrentQuest();
|
||||
|
||||
if (!_clientState.IsLoggedIn || _condition[ConditionFlag.Unconscious])
|
||||
|
@ -104,6 +104,7 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
||||
|
||||
_activeQuestComponent.Reload += OnReload;
|
||||
_quickAccessButtonsComponent.Reload += OnReload;
|
||||
_questController.IsQuestWindowOpen = () => IsOpen;
|
||||
}
|
||||
|
||||
public WindowConfig WindowConfig => _configuration.DebugWindowConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user