Skip to content

Commit 74dc55c

Browse files
committed
duty support queue for sidequests fix
1 parent 7e8e252 commit 74dc55c

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

AutoDuty/Helpers/QueueHelper.cs

+17-7
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,25 @@ internal static void QueueSupport()
154154
AddonHelper.FireCallBack(addonDawnStory, true, 11, _content.ExVersion);
155155
return;
156156
}
157-
else if (addonDawnStory->AtkValues[21].UInt != _content.DawnIndex + 1)
158-
{
159-
Svc.Log.Debug($"Queue Helper - Clicking: {_content.EnglishName} at index: {_content.DawnIndex + addonDawnStory->AtkValues[27].UInt} {addonDawnStory->AtkValues[27].UInt}");
160-
AddonHelper.FireCallBack(addonDawnStory, true, 12, (uint)_content.DawnIndex + addonDawnStory->AtkValues[27].UInt);
161-
}
162157
else
163158
{
164-
Svc.Log.Debug($"Queue Helper - Clicking: Register For Duty");
165-
AddonHelper.FireCallBack(addonDawnStory, true, 14);
159+
int sideQuestIndex = _content.ExVersion switch
160+
{
161+
0 => 15,
162+
1 => 9,
163+
2 => 8,
164+
_ => 99
165+
};
166+
if (addonDawnStory->AtkValues[21].UInt != _content.DawnIndex + (addonDawnStory->AtkValues[21].UInt > sideQuestIndex ? -sideQuestIndex : 1))
167+
{
168+
Svc.Log.Debug($"Queue Helper - Clicking: {_content.EnglishName} {_content.DawnIndex} at index: {_content.DawnIndex + addonDawnStory->AtkValues[27].UInt} {addonDawnStory->AtkValues[27].UInt}");
169+
AddonHelper.FireCallBack(addonDawnStory, true, 12, (uint)_content.DawnIndex + addonDawnStory->AtkValues[27].UInt);
170+
}
171+
else
172+
{
173+
Svc.Log.Debug($"Queue Helper - Clicking: Register For Duty");
174+
AddonHelper.FireCallBack(addonDawnStory, true, 14);
175+
}
166176
}
167177
}
168178

0 commit comments

Comments
 (0)