1
0
Fork 0
forked from aly/qstbak

muffin v7.5.1

This commit is contained in:
alydev 2026-05-01 08:59:48 +10:00
parent a6481e7b9a
commit 965a736f84
59 changed files with 4112 additions and 5059 deletions

View file

@ -90,8 +90,6 @@ internal sealed class ActiveQuestComponent
public void Draw(bool isMinimized)
{
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Expected O, but got Unknown
if (_fateController.IsRunning)
{
DrawFateActive(isMinimized);
@ -118,27 +116,17 @@ internal sealed class ActiveQuestComponent
string currentTaskState = _questController.CurrentTaskState;
if (currentTaskState != null)
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
{
ImGui.TextUnformatted(currentTaskState);
}
finally
{
((IDisposable)val)?.Dispose();
}
}
else
{
DisabledDisposable val2 = ImRaii.Disabled();
try
using (ImRaii.Disabled())
{
ImGui.TextUnformatted(_questController.DebugState ?? string.Empty);
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
}
try
@ -147,8 +135,7 @@ internal sealed class ActiveQuestComponent
QuestStep questStep = questSequence?.FindStep(questProgress.Step);
if (!isMinimized)
{
ColorDisposable val3 = new ColorDisposable();
try
using (ImRaii.ColorDisposable colorDisposable = new ImRaii.ColorDisposable())
{
bool flag;
if (questStep != null)
@ -165,14 +152,10 @@ internal sealed class ActiveQuestComponent
IL_017e:
if (flag)
{
val3.Push(ImGuiCol.Text, ImGuiColors.DalamudOrange, true);
colorDisposable.Push(ImGuiCol.Text, ImGuiColors.DalamudOrange);
}
ImGui.TextUnformatted(questStep?.Comment ?? questSequence?.Comment ?? questProgress.Quest.Root.Comment ?? string.Empty);
}
finally
{
((IDisposable)val3)?.Dispose();
}
ImGui.Text(_questController.ToStatString());
}
DrawQuestButtons(questProgress, questStep, questProgressInfo, isMinimized);
@ -208,8 +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);
DisabledDisposable val4 = ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning || !_autoDutyIpc.IsStopped());
try
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning || !_autoDutyIpc.IsStopped()))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{
@ -224,10 +206,6 @@ internal sealed class ActiveQuestComponent
}
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
if (!_autoDutyIpc.IsStopped())
@ -284,18 +262,13 @@ internal sealed class ActiveQuestComponent
private void DrawFateActive(bool isMinimized)
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold))
{
ImU8String text = new ImU8String(6, 1);
text.AppendLiteral("FATE: ");
text.AppendFormatted(Shorten(_fateController.CurrentFate.Name));
ImGui.TextUnformatted(text);
}
finally
{
((IDisposable)val)?.Dispose();
}
IList<string> remainingTaskNames = _fateController.GetRemainingTaskNames();
if (remainingTaskNames.Count > 0)
{
@ -315,18 +288,13 @@ internal sealed class ActiveQuestComponent
private void DrawDutyActive(bool isMinimized)
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
try
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);
}
finally
{
((IDisposable)val)?.Dispose();
}
IList<string> remainingTaskNames = _seasonalDutyController.GetRemainingTaskNames();
if (remainingTaskNames.Count > 0)
{
@ -346,14 +314,9 @@ internal sealed class ActiveQuestComponent
private void DrawQuestNames(QuestController.QuestProgress currentQuest, QuestController.ECurrentQuestType? currentQuestType)
{
//IL_0709: Unknown result type (might be due to invalid IL or missing references)
//IL_070e: Unknown result type (might be due to invalid IL or missing references)
//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
if (currentQuestType == QuestController.ECurrentQuestType.Simulated)
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
{
ImU8String text = new ImU8String(26, 4);
text.AppendLiteral("Simulated Quest: ");
@ -367,15 +330,10 @@ internal sealed class ActiveQuestComponent
ImGui.TextUnformatted(text);
return;
}
finally
{
((IDisposable)val)?.Dispose();
}
}
if (currentQuestType == QuestController.ECurrentQuestType.Gathering)
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold))
{
ImU8String text2 = new ImU8String(20, 4);
text2.AppendLiteral("Gathering: ");
@ -389,10 +347,6 @@ internal sealed class ActiveQuestComponent
ImGui.TextUnformatted(text2);
return;
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
QuestController.QuestProgress startedQuest = _questController.StartedQuest;
if (startedQuest != null)
@ -449,97 +403,90 @@ internal sealed class ActiveQuestComponent
ImGui.TextColored(in col, SeIconChar.Clock.ToIconString());
if (ImGui.IsItemHovered())
{
TooltipDisposable val3 = ImRaii.Tooltip();
try
using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip();
if (tooltipDisposable.Alive)
{
if (((TooltipDisposable)(ref val3)).Alive)
ImGui.Text("Stop Conditions:");
ImGui.Separator();
if (flag)
{
ImGui.Text("Stop Conditions:");
ImGui.Separator();
if (flag)
int num2 = _objectTable.LocalPlayer?.Level ?? 0;
ImU8String text4 = new ImU8String(14, 1);
text4.AppendLiteral("Stop at level ");
text4.AppendFormatted(_configuration.Stop.TargetLevel);
ImGui.BulletText(text4);
if (num2 > 0)
{
int num2 = _objectTable.LocalPlayer?.Level ?? 0;
ImU8String text4 = new ImU8String(14, 1);
text4.AppendLiteral("Stop at level ");
text4.AppendFormatted(_configuration.Stop.TargetLevel);
ImGui.BulletText(text4);
if (num2 > 0)
{
ImGui.SameLine();
if (num2 >= _configuration.Stop.TargetLevel)
{
Vector4 col2 = ImGuiColors.ParsedGreen;
ImU8String text5 = new ImU8String(22, 1);
text5.AppendLiteral("(Current: ");
text5.AppendFormatted(num2);
text5.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text5);
}
else
{
Vector4 col2 = ImGuiColors.ParsedBlue;
ImU8String text6 = new ImU8String(11, 1);
text6.AppendLiteral("(Current: ");
text6.AppendFormatted(num2);
text6.AppendLiteral(")");
ImGui.TextColored(in col2, text6);
}
}
}
if (flag3)
{
if (flag)
{
ImGui.Spacing();
}
int sequence = startedQuest.Sequence;
ImU8String text7 = new ImU8String(23, 1);
text7.AppendLiteral("Stop at quest sequence ");
text7.AppendFormatted(_configuration.Stop.TargetSequence);
ImGui.BulletText(text7);
ImGui.SameLine();
if (sequence >= _configuration.Stop.TargetSequence)
if (num2 >= _configuration.Stop.TargetLevel)
{
Vector4 col2 = ImGuiColors.ParsedGreen;
ImU8String text8 = new ImU8String(22, 1);
text8.AppendLiteral("(Current: ");
text8.AppendFormatted(sequence);
text8.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text8);
ImU8String text5 = new ImU8String(22, 1);
text5.AppendLiteral("(Current: ");
text5.AppendFormatted(num2);
text5.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text5);
}
else
{
Vector4 col2 = ImGuiColors.ParsedBlue;
ImU8String text9 = new ImU8String(11, 1);
text9.AppendLiteral("(Current: ");
text9.AppendFormatted(sequence);
text9.AppendLiteral(")");
ImGui.TextColored(in col2, text9);
ImU8String text6 = new ImU8String(11, 1);
text6.AppendLiteral("(Current: ");
text6.AppendFormatted(num2);
text6.AppendLiteral(")");
ImGui.TextColored(in col2, text6);
}
}
if (flag2)
{
if (flag || flag3)
{
ImGui.Spacing();
}
ImGui.BulletText("Stop after completing any of these quests:");
ImGui.Indent();
foreach (ElementId item in _configuration.Stop.QuestsToStopAfter)
{
if (_questRegistry.TryGetQuest(item, out Quest quest))
{
var (color, icon, _) = _uiUtils.GetQuestStyle(item);
_uiUtils.ChecklistItem($"{quest.Info.Name} ({item})", color, icon);
}
}
ImGui.Unindent();
}
}
}
finally
{
((TooltipDisposable)(ref val3)).Dispose();
if (flag3)
{
if (flag)
{
ImGui.Spacing();
}
int sequence = startedQuest.Sequence;
ImU8String text7 = new ImU8String(23, 1);
text7.AppendLiteral("Stop at quest sequence ");
text7.AppendFormatted(_configuration.Stop.TargetSequence);
ImGui.BulletText(text7);
ImGui.SameLine();
if (sequence >= _configuration.Stop.TargetSequence)
{
Vector4 col2 = ImGuiColors.ParsedGreen;
ImU8String text8 = new ImU8String(22, 1);
text8.AppendLiteral("(Current: ");
text8.AppendFormatted(sequence);
text8.AppendLiteral(" - Reached!)");
ImGui.TextColored(in col2, text8);
}
else
{
Vector4 col2 = ImGuiColors.ParsedBlue;
ImU8String text9 = new ImU8String(11, 1);
text9.AppendLiteral("(Current: ");
text9.AppendFormatted(sequence);
text9.AppendLiteral(")");
ImGui.TextColored(in col2, text9);
}
}
if (flag2)
{
if (flag || flag3)
{
ImGui.Spacing();
}
ImGui.BulletText("Stop after completing any of these quests:");
ImGui.Indent();
foreach (ElementId item in _configuration.Stop.QuestsToStopAfter)
{
if (_questRegistry.TryGetQuest(item, out Quest quest))
{
var (color, icon, _) = _uiUtils.GetQuestStyle(item);
_uiUtils.ChecklistItem($"{quest.Info.Name} ({item})", color, icon);
}
}
ImGui.Unindent();
}
}
}
}
@ -549,73 +496,65 @@ internal sealed class ActiveQuestComponent
ImGui.TextColored(ImGuiColors.DalamudYellow, SeIconChar.Hyadelyn.ToIconString());
if (ImGui.IsItemHovered())
{
TooltipDisposable val4 = ImRaii.Tooltip();
try
using ImRaii.TooltipDisposable tooltipDisposable2 = ImRaii.Tooltip();
if (tooltipDisposable2.Alive)
{
if (((TooltipDisposable)(ref val4)).Alive)
ImGui.Text("This quest sequence starts with a teleport to an Aetheryte.");
ImGui.Text("Certain priority quest (e.g. class quests) may be started/completed by the plugin prior to continuing with this quest.");
ImGui.Separator();
ImGui.Text("Available priority quests:");
List<PriorityQuestInfo> nextPriorityQuestsThatCanBeAccepted = _questFunctions.GetNextPriorityQuestsThatCanBeAccepted();
List<ElementId> list = (from x in nextPriorityQuestsThatCanBeAccepted
where x.IsAvailable
select x.QuestId).ToList();
if (list.Count > 0)
{
ImGui.Text("This quest sequence starts with a teleport to an Aetheryte.");
ImGui.Text("Certain priority quest (e.g. class quests) may be started/completed by the plugin prior to continuing with this quest.");
ImGui.Separator();
ImGui.Text("Available priority quests:");
List<PriorityQuestInfo> nextPriorityQuestsThatCanBeAccepted = _questFunctions.GetNextPriorityQuestsThatCanBeAccepted();
List<ElementId> list = (from x in nextPriorityQuestsThatCanBeAccepted
where x.IsAvailable
select x.QuestId).ToList();
if (list.Count > 0)
foreach (ElementId item2 in list)
{
foreach (ElementId item2 in list)
if (_questRegistry.TryGetQuest(item2, out Quest quest2))
{
if (_questRegistry.TryGetQuest(item2, out Quest quest2))
{
ImU8String text10 = new ImU8String(3, 2);
text10.AppendFormatted(quest2.Info.Name);
text10.AppendLiteral(" (");
text10.AppendFormatted(item2);
text10.AppendLiteral(")");
ImGui.BulletText(text10);
}
ImU8String text10 = new ImU8String(3, 2);
text10.AppendFormatted(quest2.Info.Name);
text10.AppendLiteral(" (");
text10.AppendFormatted(item2);
text10.AppendLiteral(")");
ImGui.BulletText(text10);
}
}
else
}
else
{
ImGui.BulletText("(none)");
}
if (_configuration.Advanced.AdditionalStatusInformation)
{
List<PriorityQuestInfo> list2 = nextPriorityQuestsThatCanBeAccepted.Where((PriorityQuestInfo x) => !x.IsAvailable).ToList();
if (list2.Count > 0)
{
ImGui.BulletText("(none)");
}
if (_configuration.Advanced.AdditionalStatusInformation)
{
List<PriorityQuestInfo> list2 = nextPriorityQuestsThatCanBeAccepted.Where((PriorityQuestInfo x) => !x.IsAvailable).ToList();
if (list2.Count > 0)
ImGui.Text("Unavailable priority quests:");
foreach (var (elementId2, value) in list2)
{
ImGui.Text("Unavailable priority quests:");
foreach (var (elementId2, value) in list2)
if (_questRegistry.TryGetQuest(elementId2, out Quest quest3))
{
if (_questRegistry.TryGetQuest(elementId2, out Quest quest3))
{
ImU8String text12 = new ImU8String(6, 3);
text12.AppendFormatted(quest3.Info.Name);
text12.AppendLiteral(" (");
text12.AppendFormatted(elementId2);
text12.AppendLiteral(") - ");
text12.AppendFormatted(value);
ImGui.BulletText(text12);
}
ImU8String text12 = new ImU8String(6, 3);
text12.AppendFormatted(quest3.Info.Name);
text12.AppendLiteral(" (");
text12.AppendFormatted(elementId2);
text12.AppendLiteral(") - ");
text12.AppendFormatted(value);
ImGui.BulletText(text12);
}
}
}
}
}
finally
{
((TooltipDisposable)(ref val4)).Dispose();
}
}
}
}
QuestController.QuestProgress nextQuest = _questController.NextQuest;
if (nextQuest != null)
{
ColorDisposable val5 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
{
ImU8String text13 = new ImU8String(21, 4);
text13.AppendLiteral("Next Quest: ");
@ -628,10 +567,6 @@ internal sealed class ActiveQuestComponent
text13.AppendFormatted(nextQuest.Step);
ImGui.TextUnformatted(text13);
}
finally
{
((IDisposable)val5)?.Dispose();
}
}
}
@ -645,9 +580,8 @@ internal sealed class ActiveQuestComponent
return questProgressInfo;
}
Vector4* styleColorVec = ImGui.GetStyleColorVec4(ImGuiCol.TextDisabled);
Vector4 vector = ((styleColorVec == null) ? ImGuiColors.ParsedOrange : (*styleColorVec));
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, vector, true);
try
Vector4 color = ((styleColorVec == null) ? ImGuiColors.ParsedOrange : (*styleColorVec));
using (ImRaii.PushColor(ImGuiCol.Text, color))
{
ImU8String text = new ImU8String(0, 1);
text.AppendFormatted(questProgressInfo);
@ -674,15 +608,10 @@ internal sealed class ActiveQuestComponent
ImGui.Text(text3);
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
else if (currentQuest.Quest.Id is QuestId)
{
DisabledDisposable val2 = ImRaii.Disabled();
try
using (ImRaii.Disabled())
{
if (currentQuest.Quest.Id == _questController.NextQuest?.Quest.Id)
{
@ -693,18 +622,13 @@ internal sealed class ActiveQuestComponent
ImGui.TextUnformatted("(Not accepted)");
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
return questProgressInfo;
}
private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep, QuestProgressInfo? questProgressInfo, bool isMinimized)
{
DisabledDisposable val = ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning);
try
using (ImRaii.Disabled(_questController.IsRunning || _fateController.IsRunning || _seasonalDutyController.IsRunning))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{
@ -723,10 +647,6 @@ internal sealed class ActiveQuestComponent
}
}
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
@ -746,12 +666,10 @@ internal sealed class ActiveQuestComponent
}
bool flag = currentStep == currentQuest.Quest.FindSequence(currentQuest.Sequence)?.Steps.LastOrDefault();
WaitAtEnd.WaitNextStepOrSequence task;
bool flag2 = currentStep != null && !flag && currentStep.InteractionType == EInteractionType.Instruction && _questController.HasCurrentTaskMatching<WaitAtEnd.WaitNextStepOrSequence>(out task);
val = ImRaii.Disabled(flag);
try
bool condition = currentStep != null && !flag && currentStep.InteractionType == EInteractionType.Instruction && _questController.HasCurrentTaskMatching<WaitAtEnd.WaitNextStepOrSequence>(out task);
using (ImRaii.Disabled(flag))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, flag2);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, condition))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ArrowCircleRight, "Skip"))
{
@ -763,14 +681,6 @@ internal sealed class ActiveQuestComponent
ImGui.SetTooltip("Skip the current step of the quest path.");
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
if (_commandManager.Commands.ContainsKey("/questinfo"))
{
@ -829,8 +739,7 @@ internal sealed class ActiveQuestComponent
{
return;
}
IdDisposable val = ImRaii.PushId((ImU8String)"SimulatedStep", true);
try
using (ImRaii.PushId("SimulatedStep"))
{
ImU8String text2 = new ImU8String(9, 2);
text2.AppendLiteral("Step: ");
@ -867,10 +776,6 @@ internal sealed class ActiveQuestComponent
_questController.Stop("ClearSim");
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
private static string Shorten(string text)