Skip to content

Commit 90cb8ba

Browse files
authored
Merge pull request #1189 from erdelf/dev
queueing for trusts checks levels
2 parents dff52ff + 2e4d994 commit 90cb8ba

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

AutoDuty/Helpers/QueueHelper.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ private void QueueTrust()
7878
if (TrustHelper.State == ActionState.Running) return;
7979

8080
AgentDawn* agentDawn = AgentDawn.Instance();
81+
if (!TrustHelper.LevelsSetFor(_content))
82+
{
83+
TrustHelper.GetLevels(_content);
84+
return;
85+
}
86+
8187
if (!agentDawn->IsAddonReady())
8288
{
8389
if (!EzThrottler.Throttle("OpenDawn", 5000) || !AgentHUD.Instance()->IsMainCommandEnabled(82)) return;
@@ -94,6 +100,14 @@ private void QueueTrust()
94100
return;
95101
}
96102

103+
if(!_content.CanTrustRun())
104+
{
105+
Svc.Log.Debug("Queue Helper - Trust can't run, stopping QueueHelper");
106+
this.Stop();
107+
Plugin.Stage = Stage.Stopped;
108+
return;
109+
}
110+
97111
if ((byte) agentDawn->SelectedContentId != _content.DawnRowId)
98112
{
99113
Svc.Log.Debug($"Queue Helper - Clicking: {_content.EnglishName} at {_content.RowId} with dawn {_content.DawnRowId} instead of {agentDawn->SelectedContentId}");

0 commit comments

Comments
 (0)