forked from aly/qstbak
muffin v7.4.19
This commit is contained in:
parent
f82b9ce2a2
commit
afafd5e377
9 changed files with 896 additions and 796 deletions
|
|
@ -34,6 +34,8 @@ internal sealed class ActiveQuestComponent
|
|||
|
||||
private readonly FateController _fateController;
|
||||
|
||||
private readonly SeasonalDutyController _seasonalDutyController;
|
||||
|
||||
private readonly QuestFunctions _questFunctions;
|
||||
|
||||
private readonly ICommandManager _commandManager;
|
||||
|
|
@ -65,13 +67,14 @@ internal sealed class ActiveQuestComponent
|
|||
return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance;
|
||||
}
|
||||
|
||||
public ActiveQuestComponent(QuestController questController, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, QuestFunctions questFunctions, ICommandManager commandManager, Configuration configuration, QuestRegistry questRegistry, PriorityWindow priorityWindow, UiUtils uiUtils, IObjectTable objectTable, IClientState clientState, IChatGui chatGui, AutoDutyIpc autoDutyIpc, ILogger<ActiveQuestComponent> logger)
|
||||
public ActiveQuestComponent(QuestController questController, MovementController movementController, CombatController combatController, GatheringController gatheringController, FateController fateController, SeasonalDutyController seasonalDutyController, QuestFunctions questFunctions, ICommandManager commandManager, Configuration configuration, QuestRegistry questRegistry, PriorityWindow priorityWindow, UiUtils uiUtils, IObjectTable objectTable, IClientState clientState, IChatGui chatGui, AutoDutyIpc autoDutyIpc, ILogger<ActiveQuestComponent> logger)
|
||||
{
|
||||
_questController = questController;
|
||||
_movementController = movementController;
|
||||
_combatController = combatController;
|
||||
_gatheringController = gatheringController;
|
||||
_fateController = fateController;
|
||||
_seasonalDutyController = seasonalDutyController;
|
||||
_questFunctions = questFunctions;
|
||||
_commandManager = commandManager;
|
||||
_configuration = configuration;
|
||||
|
|
@ -92,6 +95,11 @@ internal sealed class ActiveQuestComponent
|
|||
DrawFateActive(isMinimized);
|
||||
return;
|
||||
}
|
||||
if (_seasonalDutyController.IsRunning)
|
||||
{
|
||||
DrawDutyActive(isMinimized);
|
||||
return;
|
||||
}
|
||||
(QuestController.QuestProgress, QuestController.ECurrentQuestType)? currentQuestDetails = _questController.CurrentQuestDetails;
|
||||
QuestController.QuestProgress questProgress = currentQuestDetails?.Item1;
|
||||
QuestController.ECurrentQuestType? currentQuestType = currentQuestDetails?.Item2;
|
||||
|
|
@ -136,12 +144,12 @@ internal sealed class ActiveQuestComponent
|
|||
if (interactionType == EInteractionType.WaitForManualProgress || interactionType == EInteractionType.Snipe || interactionType == EInteractionType.Instruction)
|
||||
{
|
||||
flag = true;
|
||||
goto IL_0169;
|
||||
goto IL_017e;
|
||||
}
|
||||
}
|
||||
flag = false;
|
||||
goto IL_0169;
|
||||
IL_0169:
|
||||
goto IL_017e;
|
||||
IL_017e:
|
||||
if (flag)
|
||||
{
|
||||
color.Push(ImGuiCol.Text, ImGuiColors.DalamudOrange);
|
||||
|
|
@ -183,7 +191,7 @@ internal sealed class ActiveQuestComponent
|
|||
text2.AppendFormatted((item2 == 1) ? string.Empty : "s");
|
||||
text2.AppendLiteral(" - Leveling mode will start automatically");
|
||||
ImGui.TextColored(in col, text2);
|
||||
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || !_autoDutyIpc.IsStopped()))
|
||||
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning || !_autoDutyIpc.IsStopped()))
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
{
|
||||
|
|
@ -278,6 +286,32 @@ internal sealed class ActiveQuestComponent
|
|||
}
|
||||
}
|
||||
|
||||
private void DrawDutyActive(bool isMinimized)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
{
|
||||
ImU8String text = new ImU8String(6, 1);
|
||||
text.AppendLiteral("Duty: ");
|
||||
text.AppendFormatted(Shorten(_seasonalDutyController.CurrentDuty.Name));
|
||||
ImGui.TextUnformatted(text);
|
||||
}
|
||||
IList<string> remainingTaskNames = _seasonalDutyController.GetRemainingTaskNames();
|
||||
if (remainingTaskNames.Count > 0)
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, remainingTaskNames[0]);
|
||||
}
|
||||
if (!isMinimized)
|
||||
{
|
||||
string text2 = (_seasonalDutyController.CycleLimit.HasValue ? $"Cycle {_seasonalDutyController.CompletedCycles + 1} / {_seasonalDutyController.CycleLimit}" : $"Cycle {_seasonalDutyController.CompletedCycles + 1}");
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, text2);
|
||||
}
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
|
||||
{
|
||||
_seasonalDutyController.Stop("UI stop");
|
||||
_movementController.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawQuestNames(QuestController.QuestProgress currentQuest, QuestController.ECurrentQuestType? currentQuestType)
|
||||
{
|
||||
if (currentQuestType == QuestController.ECurrentQuestType.Simulated)
|
||||
|
|
@ -594,7 +628,7 @@ internal sealed class ActiveQuestComponent
|
|||
|
||||
private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep, QuestProgressInfo? questProgressInfo, bool isMinimized)
|
||||
{
|
||||
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning))
|
||||
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning))
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue