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

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
@ -29,33 +28,44 @@ internal sealed class ChangelogWindow : LWindow
private float _headerAnimationTime;
private bool _closeRequested;
public ChangelogWindow(Configuration configuration, IDalamudPluginInterface pluginInterface)
: base("Questionable Changelog###QuestionableChangelog", ImGuiWindowFlags.NoTitleBar)
: base("Questionable Changelog###QuestionableChangelog", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
_configuration = configuration;
_pluginInterface = pluginInterface;
_headerComponent = new ChangelogHeaderComponent();
_footerComponent = new ChangelogFooterComponent();
base.Size = new Vector2(900f, 650f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(700f, 500f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(float.MaxValue, float.MaxValue);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(700f, 500f),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
}
public override void PreDraw()
{
base.PreDraw();
if (_closeRequested)
{
_closeRequested = false;
base.IsOpen = false;
}
}
public override void DrawContent()
{
_headerComponent.Draw(delegate(bool isOpen)
_headerComponent.Draw(delegate
{
base.IsOpen = isOpen;
_closeRequested = true;
});
DrawChangelogEntries();
ChangelogFooterComponent.Draw(delegate
{
base.IsOpen = false;
_closeRequested = true;
});
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
Vector2 windowPos = ImGui.GetWindowPos();
@ -80,90 +90,50 @@ internal sealed class ChangelogWindow : LWindow
private void DrawChangelogEntries()
{
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
_headerAnimationTime += ImGui.GetIO().DeltaTime;
ColorDisposable val = ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f)))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f)))
{
float num = ImGui.GetFrameHeightWithSpacing() + ImGui.GetStyle().ItemSpacing.Y * 2f;
ChildDisposable val5 = ImRaii.Child((ImU8String)"ChangelogScroll", new Vector2(0f, 0f - num), false, ImGuiWindowFlags.NoScrollbar);
try
float num = ImGui.GetFrameHeightWithSpacing() + 16f;
using ImRaii.ChildDisposable childDisposable = ImRaii.Child("ChangelogScroll", new Vector2(0f, 0f - num), border: false, ImGuiWindowFlags.NoScrollbar);
if (!childDisposable)
{
if (!val5)
{
return;
}
ChildDisposable val6 = ImRaii.Child((ImU8String)"ChangelogScrollInner", Vector2.Zero, false);
try
{
if (!val6)
{
return;
}
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
if (changelogs.Count == 0)
{
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
ImGui.TextDisabled("No changelog entries available.");
return;
}
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
foreach (ChangelogEntry item in changelogs)
{
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
}
_hasSetInitialState = true;
}
finally
{
((ChildDisposable)(ref val6)).Dispose();
}
return;
}
finally
using ImRaii.ChildDisposable childDisposable2 = ImRaii.Child("ChangelogScrollInner", Vector2.Zero, border: false);
if (!childDisposable2)
{
((ChildDisposable)(ref val5)).Dispose();
return;
}
}
finally
{
((IDisposable)val4)?.Dispose();
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
if (changelogs.Count == 0)
{
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
ImGui.TextDisabled("No changelog entries available.");
return;
}
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
foreach (ChangelogEntry item in changelogs)
{
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
}
_hasSetInitialState = true;
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}

View file

@ -36,12 +36,6 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
public ConfigWindow(IDalamudPluginInterface pluginInterface, GeneralConfigComponent generalConfigComponent, PluginConfigComponent pluginConfigComponent, DutyConfigComponent dutyConfigComponent, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent, StopConditionComponent stopConditionComponent, BlacklistConfigComponent blacklistConfigComponent, NotificationConfigComponent notificationConfigComponent, DebugConfigComponent debugConfigComponent, Configuration configuration, ChangelogWindow changelogWindow)
: base("Config - Questionable###QuestionableConfig", ImGuiWindowFlags.AlwaysAutoResize)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Expected O, but got Unknown
_pluginInterface = pluginInterface;
_generalConfigComponent = generalConfigComponent;
_pluginConfigComponent = pluginConfigComponent;
@ -52,7 +46,7 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
_notificationConfigComponent = notificationConfigComponent;
_debugConfigComponent = debugConfigComponent;
_configuration = configuration;
((Window)this).TitleBarButtons.Add(new TitleBarButton
base.TitleBarButtons.Add(new TitleBarButton
{
Icon = FontAwesomeIcon.FileAlt,
IconOffset = new Vector2(1.5f, 1f),
@ -71,27 +65,17 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
public override void DrawContent()
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
TabBarDisposable val = ImRaii.TabBar((ImU8String)"QuestionableConfigTabs");
try
using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("QuestionableConfigTabs");
if (!(!tabBarDisposable))
{
if (!(!val))
{
_generalConfigComponent.DrawTab();
_pluginConfigComponent.DrawTab();
_dutyConfigComponent.DrawTab();
_singlePlayerDutyConfigComponent.DrawTab();
_stopConditionComponent.DrawTab();
_blacklistConfigComponent.DrawTab();
_notificationConfigComponent.DrawTab();
_debugConfigComponent.DrawTab();
}
}
finally
{
((TabBarDisposable)(ref val)).Dispose();
_generalConfigComponent.DrawTab();
_pluginConfigComponent.DrawTab();
_dutyConfigComponent.DrawTab();
_singlePlayerDutyConfigComponent.DrawTab();
_stopConditionComponent.DrawTab();
_blacklistConfigComponent.DrawTab();
_notificationConfigComponent.DrawTab();
_debugConfigComponent.DrawTab();
}
}

View file

@ -41,7 +41,6 @@ internal sealed class FateSelectionWindow : LWindow
public FateSelectionWindow(FateController fateController, FateDefinitionRegistry fateDefinitionRegistry, QuestController questController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
: base("FATE Farming###QuestionableFateFarming")
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
_fateController = fateController;
_fateDefinitionRegistry = fateDefinitionRegistry;
_questController = questController;
@ -51,11 +50,11 @@ internal sealed class FateSelectionWindow : LWindow
_territoryData = territoryData;
base.Size = new Vector2(600f, 400f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 300f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(900f, 700f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(500f, 300f),
MaximumSize = new Vector2(900f, 700f)
};
}
public override void DrawContent()
@ -91,26 +90,18 @@ internal sealed class FateSelectionWindow : LWindow
float num2 = (float)ImGui.GetTime();
float num3 = 0.85f + MathF.Sin(num2 * 3f) * 0.15f;
Vector4 col = new Vector4(1f * num3, 0.85f * num3, 0f, 1f);
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(in col, FontAwesomeIcon.Star.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.ParsedGold, _fateController.CurrentFate.Name);
ImGui.SameLine(x - 35f);
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
try
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
@ -118,19 +109,7 @@ internal sealed class FateSelectionWindow : LWindow
_movementController.Stop();
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
string value = (_fateController.CycleLimit.HasValue ? $"Cycle {_fateController.CompletedCycles + 1} / {_fateController.CycleLimit}" : $"Cycle {_fateController.CompletedCycles + 1}");
@ -158,8 +137,7 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.TextColored(in col2, text3);
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
DisabledDisposable val5 = ImRaii.Disabled(true);
try
using (ImRaii.Disabled(disabled: true))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -167,18 +145,13 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.SetNextItemWidth(100f);
ImGui.InputInt("##CycleLimitRunning", ref _cycleLimit, 1, 5);
}
finally
{
((IDisposable)val5)?.Dispose();
}
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY() + 4f);
ImGui.Spacing();
}
private void DrawControlsStrip()
{
DisabledDisposable val = ImRaii.Disabled(_fateController.IsRunning);
try
using (ImRaii.Disabled(_fateController.IsRunning))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -192,10 +165,6 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.DalamudGrey, (_cycleLimit == 0) ? "(unlimited)" : "");
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.Spacing();
}
@ -237,9 +206,6 @@ internal sealed class FateSelectionWindow : LWindow
private void DrawFateTable()
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
List<FateDefinition> list = _fateDefinitionRegistry.Definitions.Values.OrderBy(delegate(FateDefinition f)
{
DateTime? eventExpiry = f.EventExpiry;
@ -267,49 +233,40 @@ internal sealed class FateSelectionWindow : LWindow
return double.MaxValue;
}).ThenBy<FateDefinition, string>((FateDefinition f) => f.Name, StringComparer.OrdinalIgnoreCase)
.ToList();
TableDisposable val = ImRaii.Table((ImU8String)"FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
if (!tableDisposable)
{
if (!val)
{
return;
}
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (FateDefinition item in list)
{
ImGui.TableNextRow();
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
}
ImGui.TableNextColumn();
DrawFateRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
ImGui.TableNextColumn();
DrawFateRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawFateRowActions(item, disabled);
}
return;
}
finally
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (FateDefinition item in list)
{
((TableDisposable)(ref val)).Dispose();
ImGui.TableNextRow();
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
}
ImGui.TableNextColumn();
DrawFateRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
ImGui.TableNextColumn();
DrawFateRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawFateRowActions(item, disabled);
}
}
private void DrawFateRowName(FateDefinition fate, bool isActive)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
if (isActive)
{
float num = (float)ImGui.GetTime();
@ -324,8 +281,7 @@ internal sealed class FateSelectionWindow : LWindow
{
return;
}
TooltipDisposable val = ImRaii.Tooltip();
try
using (ImRaii.Tooltip())
{
ImGui.TextColored(ImGuiColors.DalamudWhite, fate.Name);
ImGui.Separator();
@ -360,10 +316,6 @@ internal sealed class FateSelectionWindow : LWindow
}
}
}
finally
{
((TooltipDisposable)(ref val)).Dispose();
}
}
private static void DrawFateRowExpiry(FateDefinition fate)
@ -392,23 +344,17 @@ internal sealed class FateSelectionWindow : LWindow
private void DrawFateRowActions(FateDefinition fate, bool disabled)
{
bool flag = fate.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(fate.RequiredQuestId.Value));
ImU8String imU8String = new ImU8String(5, 1);
imU8String.AppendLiteral("fate_");
imU8String.AppendFormatted(fate.Name);
IdDisposable val = ImRaii.PushId(imU8String, true);
try
ImU8String id = new ImU8String(5, 1);
id.AppendLiteral("fate_");
id.AppendFormatted(fate.Name);
using (ImRaii.PushId(id))
{
if (flag)
{
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
}
finally
{
((IDisposable)val2)?.Dispose();
}
if (ImGui.IsItemHovered())
{
IQuestInfo questInfo;
@ -421,8 +367,7 @@ internal sealed class FateSelectionWindow : LWindow
}
return;
}
DisabledDisposable val3 = ImRaii.Disabled(disabled);
try
using (ImRaii.Disabled(disabled))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{
@ -432,10 +377,6 @@ internal sealed class FateSelectionWindow : LWindow
_fateController.Start(fate, cycleLimit);
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
if (_fateController.IsRunning)
@ -448,10 +389,6 @@ internal sealed class FateSelectionWindow : LWindow
}
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
private static string FormatElapsed(TimeSpan elapsed)

View file

@ -1,6 +1,5 @@
using System;
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Interface.Windowing;
using Dalamud.Plugin.Services;
@ -29,7 +28,6 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
public JournalProgressWindow(QuestJournalComponent questJournalComponent, QuestRewardComponent questRewardComponent, AlliedSocietyJournalComponent alliedSocietyJournalComponent, GatheringJournalComponent gatheringJournalComponent, DutyJournalComponent dutyJournalComponent, QuestRegistry questRegistry, IClientState clientState)
: base("Journal Progress###QuestionableJournalProgress")
{
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
_questJournalComponent = questJournalComponent;
_alliedSocietyJournalComponent = alliedSocietyJournalComponent;
_questRewardComponent = questRewardComponent;
@ -44,10 +42,10 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
_clientState.Logout += _questJournalComponent.ClearCounts;
_clientState.Logout += _gatheringJournalComponent.ClearCounts;
_questRegistry.Reloaded += OnQuestsReloaded;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(700f, 500f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(700f, 500f)
};
}
private void OnQuestsReloaded(object? sender, EventArgs e)
@ -69,24 +67,14 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
public override void DrawContent()
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
TabBarDisposable val = ImRaii.TabBar((ImU8String)"Journal");
try
using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("Journal");
if (!(!tabBarDisposable))
{
if (!(!val))
{
_questJournalComponent.DrawQuests();
_dutyJournalComponent.DrawDuties();
_alliedSocietyJournalComponent.DrawAlliedSocietyQuests();
_questRewardComponent.DrawItemRewards();
_gatheringJournalComponent.DrawGatheringItems();
}
}
finally
{
((TabBarDisposable)(ref val)).Dispose();
_questJournalComponent.DrawQuests();
_dutyJournalComponent.DrawDuties();
_alliedSocietyJournalComponent.DrawAlliedSocietyQuests();
_questRewardComponent.DrawItemRewards();
_gatheringJournalComponent.DrawGatheringItems();
}
}

View file

@ -1,4 +1,3 @@
using System;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
@ -44,8 +43,7 @@ internal sealed class OneTimeSetupWindow : LWindow
ImGui.Spacing();
if (allRequiredInstalled)
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Finish Setup"))
{
@ -55,29 +53,15 @@ internal sealed class OneTimeSetupWindow : LWindow
base.IsOpen = false;
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
else
{
DisabledDisposable val2 = ImRaii.Disabled();
try
using (ImRaii.Disabled())
{
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true);
try
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
{
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Missing required plugins");
}
finally
{
((IDisposable)val)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
ImGui.SameLine();

View file

@ -33,80 +33,43 @@ internal sealed class PriorityWindow : LWindow
public PriorityWindow(QuestController questController, QuestFunctions questFunctions, QuestSelector questSelector, QuestTooltipComponent questTooltipComponent, PresetBuilderComponent presetBuilderComponent, SavedPresetsComponent savedPresetsComponent, UiUtils uiUtils, IChatGui chatGui, IDalamudPluginInterface pluginInterface)
: base("Quest Priority###QuestionableQuestPriority")
{
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
_manualPriorityComponent = new ManualPriorityComponent(questController, questFunctions, questSelector, questTooltipComponent, uiUtils, chatGui, pluginInterface);
_presetBuilderComponent = presetBuilderComponent;
_savedPresetsComponent = savedPresetsComponent;
base.Size = new Vector2(500f, 500f);
base.SizeCondition = ImGuiCond.Once;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(615f, 500f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(800f, 1000f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(615f, 500f),
MaximumSize = new Vector2(800f, 1000f)
};
}
public override void DrawContent()
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
TabBarDisposable val = ImRaii.TabBar((ImU8String)"PriorityTabs");
try
using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("PriorityTabs");
if (!tabBarDisposable)
{
if (!val)
return;
}
using (ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Manual Priority"))
{
if ((bool)tabItemDisposable)
{
return;
}
TabItemDisposable val2 = ImRaii.TabItem((ImU8String)"Manual Priority");
try
{
if (TabItemDisposable.op_Implicit(val2))
{
_manualPriorityComponent.Draw();
}
}
finally
{
((TabItemDisposable)(ref val2)).Dispose();
}
TabItemDisposable val3 = ImRaii.TabItem((ImU8String)"Quest Presets");
try
{
if (TabItemDisposable.op_Implicit(val3))
{
_presetBuilderComponent.Draw();
}
}
finally
{
((TabItemDisposable)(ref val3)).Dispose();
}
TabItemDisposable val4 = ImRaii.TabItem((ImU8String)"Saved Presets");
try
{
if (TabItemDisposable.op_Implicit(val4))
{
_savedPresetsComponent.Draw();
}
}
finally
{
((TabItemDisposable)(ref val4)).Dispose();
_manualPriorityComponent.Draw();
}
}
finally
using (ImRaii.TabItemDisposable tabItemDisposable2 = ImRaii.TabItem("Quest Presets"))
{
((TabBarDisposable)(ref val)).Dispose();
if ((bool)tabItemDisposable2)
{
_presetBuilderComponent.Draw();
}
}
using ImRaii.TabItemDisposable tabItemDisposable3 = ImRaii.TabItem("Saved Presets");
if ((bool)tabItemDisposable3)
{
_savedPresetsComponent.Draw();
}
}

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
@ -60,7 +59,6 @@ internal sealed class QuestSelectionWindow : LWindow
public QuestSelectionWindow(QuestData questData, IGameGui gameGui, IChatGui chatGui, QuestFunctions questFunctions, QuestController questController, QuestRegistry questRegistry, IDalamudPluginInterface pluginInterface, TerritoryData territoryData, IClientState clientState, UiUtils uiUtils, QuestTooltipComponent questTooltipComponent)
: base("Quest Selection###QuestionableQuestSelection")
{
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
_questData = questData;
_gameGui = gameGui;
_chatGui = chatGui;
@ -74,10 +72,10 @@ internal sealed class QuestSelectionWindow : LWindow
_questTooltipComponent = questTooltipComponent;
base.Size = new Vector2(500f, 200f);
base.SizeCondition = ImGuiCond.Once;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 200f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(500f, 200f)
};
}
public unsafe void OpenForTarget(IGameObject? gameObject)
@ -135,145 +133,130 @@ internal sealed class QuestSelectionWindow : LWindow
public override void DrawContent()
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
if (_offeredQuests.Count != 0)
{
ImGui.Checkbox("Only show quests currently offered", ref _onlyAvailableQuests);
}
TableDisposable val = ImRaii.Table((ImU8String)"QuestSelection", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.ScrollY);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("QuestSelection", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.ScrollY);
if (!tableDisposable)
{
if (!val)
ImGui.Text("Not table");
return;
}
float x;
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
{
x = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X;
}
ImGui.PushFont(UiBuilder.IconFont);
float initWidthOrWeight = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + 6f * ImGui.GetStyle().FramePadding.X + 2f * ImGui.GetStyle().ItemSpacing.X;
ImGui.PopFont();
ImGui.TableSetupColumn("Id", ImGuiTableColumnFlags.WidthFixed, 50f * ImGui.GetIO().FontGlobalScale);
ImGui.TableSetupColumn("", ImGuiTableColumnFlags.WidthFixed, x);
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 200f);
ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, initWidthOrWeight);
ImGui.TableHeadersRow();
foreach (IQuestInfo item in (_offeredQuests.Count != 0 && _onlyAvailableQuests) ? _offeredQuests : _quests)
{
ImGui.TableNextRow();
string text = item.QuestId.ToString();
Quest quest;
bool flag = _questRegistry.TryGetQuest(item.QuestId, out quest);
if (ImGui.TableNextColumn())
{
ImGui.Text("Not table");
return;
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted(text);
}
float x;
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
if (ImGui.TableNextColumn())
{
x = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X;
}
ImGui.PushFont(UiBuilder.IconFont);
float initWidthOrWeight = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + 6f * ImGui.GetStyle().FramePadding.X + 2f * ImGui.GetStyle().ItemSpacing.X;
ImGui.PopFont();
ImGui.TableSetupColumn("Id", ImGuiTableColumnFlags.WidthFixed, 50f * ImGui.GetIO().FontGlobalScale);
ImGui.TableSetupColumn("", ImGuiTableColumnFlags.WidthFixed, x);
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 200f);
ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, initWidthOrWeight);
ImGui.TableHeadersRow();
foreach (IQuestInfo item in (_offeredQuests.Count != 0 && _onlyAvailableQuests) ? _offeredQuests : _quests)
{
ImGui.TableNextRow();
string text = item.QuestId.ToString();
Quest quest;
bool flag = _questRegistry.TryGetQuest(item.QuestId, out quest);
if (ImGui.TableNextColumn())
ImGui.AlignTextToFramePadding();
var (col, icon, _) = _uiUtils.GetQuestStyle(item.QuestId);
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted(text);
if (flag)
{
ImGui.TextColored(in col, icon.ToIconString());
}
else
{
ImGui.TextColored(ImGuiColors.DalamudGrey, icon.ToIconString());
}
}
if (ImGui.TableNextColumn())
if (ImGui.IsItemHovered())
{
_questTooltipComponent.Draw(item);
}
}
if (ImGui.TableNextColumn())
{
ImGui.AlignTextToFramePadding();
if (quest != null && quest.Root.Disabled)
{
ImGui.AlignTextToFramePadding();
var (col, icon, _) = _uiUtils.GetQuestStyle(item.QuestId);
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
{
if (flag)
{
ImGui.TextColored(in col, icon.ToIconString());
}
else
{
ImGui.TextColored(ImGuiColors.DalamudGrey, icon.ToIconString());
}
}
if (ImGui.IsItemHovered())
{
_questTooltipComponent.Draw(item);
ImGui.TextColored(ImGuiColors.DalamudOrange, FontAwesomeIcon.Ban.ToIconString());
ImGui.SameLine();
}
}
if (ImGui.TableNextColumn())
ImGui.TextUnformatted(item.Name);
}
if (!ImGui.TableNextColumn())
{
continue;
}
using (ImRaii.PushId(text))
{
bool num = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);
if (ImGui.IsItemHovered())
{
ImGui.AlignTextToFramePadding();
if (quest != null && quest.Root.Disabled)
{
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
{
ImGui.TextColored(ImGuiColors.DalamudOrange, FontAwesomeIcon.Ban.ToIconString());
ImGui.SameLine();
}
}
ImGui.TextUnformatted(item.Name);
ImGui.SetTooltip("Copy as file name");
}
if (!ImGui.TableNextColumn())
if (num)
{
CopyToClipboard(item, suffix: true);
}
else if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
{
CopyToClipboard(item, suffix: false);
}
ImGui.SameLine();
if (quest == null)
{
continue;
}
IdDisposable val2 = ImRaii.PushId((ImU8String)text, true);
try
EInteractionType? eInteractionType = quest.FindSequence(0)?.LastStep()?.InteractionType;
if (!eInteractionType.HasValue || eInteractionType != EInteractionType.AcceptQuest || !_questFunctions.IsReadyToAcceptQuest(item.QuestId))
{
bool num = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Copy as file name");
}
if (num)
{
CopyToClipboard(item, suffix: true);
}
else if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
{
CopyToClipboard(item, suffix: false);
}
ImGui.SameLine();
if (quest == null)
{
continue;
}
EInteractionType? eInteractionType = quest.FindSequence(0)?.LastStep()?.InteractionType;
if (!eInteractionType.HasValue || eInteractionType != EInteractionType.AcceptQuest || !_questFunctions.IsReadyToAcceptQuest(item.QuestId))
{
continue;
}
ImGui.BeginDisabled(_questController.NextQuest != null || _questController.SimulatedQuest != null);
bool num2 = ImGuiComponents.IconButton(FontAwesomeIcon.Play);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Start as next quest");
}
if (num2)
{
_questController.SetNextQuest(quest);
if (!_questController.ManualPriorityQuests.Contains(quest))
{
_questController.ManualPriorityQuests.Insert(0, quest);
}
_questController.Start("QuestSelectionWindow");
}
ImGui.SameLine();
bool num3 = ImGuiComponents.IconButton(FontAwesomeIcon.AngleDoubleRight);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Set as next quest");
}
if (num3)
{
_questController.SetNextQuest(quest);
}
ImGui.EndDisabled();
continue;
}
finally
ImGui.BeginDisabled(_questController.NextQuest != null || _questController.SimulatedQuest != null);
bool num2 = ImGuiComponents.IconButton(FontAwesomeIcon.Play);
if (ImGui.IsItemHovered())
{
((IDisposable)val2)?.Dispose();
ImGui.SetTooltip("Start as next quest");
}
if (num2)
{
_questController.SetNextQuest(quest);
if (!_questController.ManualPriorityQuests.Contains(quest))
{
_questController.ManualPriorityQuests.Insert(0, quest);
}
_questController.Start("QuestSelectionWindow");
}
ImGui.SameLine();
bool num3 = ImGuiComponents.IconButton(FontAwesomeIcon.AngleDoubleRight);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Set as next quest");
}
if (num3)
{
_questController.SetNextQuest(quest);
}
ImGui.EndDisabled();
}
}
finally
{
((TableDisposable)(ref val)).Dispose();
}
}
private void CopyToClipboard(IQuestInfo quest, bool suffix)

View file

@ -1,4 +1,3 @@
using System;
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Utility.Raii;
@ -25,17 +24,16 @@ internal sealed class QuestSequenceWindow : LWindow, IPersistableWindowConfig
public QuestSequenceWindow(IDalamudPluginInterface pluginInterface, Configuration configuration, QuestSequenceComponent questSequenceComponent)
: base("Quest Sequence Viewer###QuestionableQuestSequenceViewer", ImGuiWindowFlags.NoTitleBar)
{
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
_pluginInterface = pluginInterface;
_configuration = configuration;
_questSequenceComponent = questSequenceComponent;
base.Size = new Vector2(950f, 700f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(750f, 550f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(float.MaxValue, float.MaxValue);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(750f, 550f),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
}
public void SaveWindowConfig()
@ -52,83 +50,42 @@ internal sealed class QuestSequenceWindow : LWindow, IPersistableWindowConfig
public override void DrawContent()
{
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
bool isOpen = base.IsOpen;
QuestSequenceComponent.DrawCustomHeader(ref isOpen);
base.IsOpen = isOpen;
ImGui.Spacing();
ImGui.Spacing();
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Tab, new Vector4(0.15f, 0.13f, 0.2f, 0.7f), true);
try
using (ImRaii.PushColor(ImGuiCol.Tab, new Vector4(0.15f, 0.13f, 0.2f, 0.7f)))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.TabHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f), true);
try
using (ImRaii.PushColor(ImGuiCol.TabHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.TabActive, new Vector4(0.28f, 0.24f, 0.35f, 1f), true);
try
using (ImRaii.PushColor(ImGuiCol.TabActive, new Vector4(0.28f, 0.24f, 0.35f, 1f)))
{
TabBarDisposable val4 = ImRaii.TabBar((ImU8String)"QuestSequenceTabs", ImGuiTabBarFlags.None);
try
using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("QuestSequenceTabs", ImGuiTabBarFlags.None);
if (!tabBarDisposable)
{
if (!val4)
{
return;
}
TabItemDisposable val5 = ImRaii.TabItem((ImU8String)"Current Quest", ImGuiTabItemFlags.None);
try
{
if (TabItemDisposable.op_Implicit(val5))
{
ImGui.Spacing();
_questSequenceComponent.DrawCurrentQuestTab();
}
}
finally
{
((TabItemDisposable)(ref val5)).Dispose();
}
ImGuiTabItemFlags imGuiTabItemFlags = (_selectLookupTabNextFrame ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None);
TabItemDisposable val6 = ImRaii.TabItem((ImU8String)"Quest Lookup", imGuiTabItemFlags);
try
{
if (TabItemDisposable.op_Implicit(val6))
{
ImGui.Spacing();
_questSequenceComponent.DrawQuestLookupTab();
}
}
finally
{
((TabItemDisposable)(ref val6)).Dispose();
}
_selectLookupTabNextFrame = false;
return;
}
finally
using (ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Current Quest", ImGuiTabItemFlags.None))
{
((TabBarDisposable)(ref val4)).Dispose();
if ((bool)tabItemDisposable)
{
ImGui.Spacing();
_questSequenceComponent.DrawCurrentQuestTab();
}
}
}
finally
{
((IDisposable)val3)?.Dispose();
ImGuiTabItemFlags flags = (_selectLookupTabNextFrame ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None);
using (ImRaii.TabItemDisposable tabItemDisposable2 = ImRaii.TabItem("Quest Lookup", flags))
{
if ((bool)tabItemDisposable2)
{
ImGui.Spacing();
_questSequenceComponent.DrawQuestLookupTab();
}
}
_selectLookupTabNextFrame = false;
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
QuestSequenceComponent.DrawWindowBorder();
}

View file

@ -20,16 +20,15 @@ internal sealed class QuestValidationWindow : LWindow, IPersistableWindowConfig
public QuestValidationWindow(QuestValidationComponent questValidationComponent, IDalamudPluginInterface pluginInterface, Configuration configuration)
: base("Quest Validation###QuestionableValidator")
{
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
_questValidationComponent = questValidationComponent;
_pluginInterface = pluginInterface;
_configuration = configuration;
base.Size = new Vector2(800f, 400f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(600f, 300f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(600f, 300f)
};
}
public void SaveWindowConfig()

View file

@ -57,21 +57,6 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
public QuestWindow(IDalamudPluginInterface pluginInterface, QuestController questController, IObjectTable objectTable, IClientState clientState, Configuration configuration, TerritoryData territoryData, ActiveQuestComponent activeQuestComponent, ARealmRebornComponent aRealmRebornComponent, EventInfoComponent eventInfoComponent, CreationUtilsComponent creationUtilsComponent, QuickAccessButtonsComponent quickAccessButtonsComponent, RemainingTasksComponent remainingTasksComponent, IFramework framework, InteractionUiController interactionUiController, ConfigWindow configWindow)
: base("Questionable v" + PluginVersion.ToString(3) + "###Questionable", ImGuiWindowFlags.AlwaysAutoResize)
{
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Expected O, but got Unknown
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_01bf: Expected O, but got Unknown
QuestWindow questWindow = this;
_pluginInterface = pluginInterface;
_questController = questController;
@ -87,11 +72,11 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
_remainingTasksComponent = remainingTasksComponent;
_framework = framework;
_interactionUiController = interactionUiController;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(240f, 30f);
((WindowSizeConstraints)(ref value)).MaximumSize = default(Vector2);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(240f, 30f),
MaximumSize = default(Vector2)
};
base.RespectCloseHotkey = false;
base.AllowClickthrough = false;
_minimizeButton = new TitleBarButton
@ -106,8 +91,8 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
},
AvailableClickthrough = true
};
((Window)this).TitleBarButtons.Insert(0, _minimizeButton);
((Window)this).TitleBarButtons.Add(new TitleBarButton
base.TitleBarButtons.Insert(0, _minimizeButton);
base.TitleBarButtons.Add(new TitleBarButton
{
Icon = FontAwesomeIcon.Cog,
IconOffset = new Vector2(1.5f, 1f),

View file

@ -43,7 +43,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
public SeasonalDutySelectionWindow(SeasonalDutyController seasonalDutyController, SeasonalDutyDefinitionRegistry seasonalDutyDefinitionRegistry, QuestController questController, FateController fateController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
: base("Seasonal Duty Farming###QuestionableSeasonalDutyFarming")
{
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
_seasonalDutyController = seasonalDutyController;
_seasonalDutyDefinitionRegistry = seasonalDutyDefinitionRegistry;
_questController = questController;
@ -54,11 +53,11 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
_territoryData = territoryData;
base.Size = new Vector2(600f, 400f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 300f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(900f, 700f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(500f, 300f),
MaximumSize = new Vector2(900f, 700f)
};
}
public override void DrawContent()
@ -94,26 +93,18 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
float num2 = (float)ImGui.GetTime();
float num3 = 0.85f + MathF.Sin(num2 * 3f) * 0.15f;
Vector4 col = new Vector4(0f, 1f * num3, 0.3f * num3, 1f);
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(in col, FontAwesomeIcon.Leaf.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.ParsedGreen, _seasonalDutyController.CurrentDuty.Name);
ImGui.SameLine(x - 35f);
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
try
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
@ -121,19 +112,7 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
_movementController.Stop();
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
string value = (_seasonalDutyController.CycleLimit.HasValue ? $"Cycle {_seasonalDutyController.CompletedCycles + 1} / {_seasonalDutyController.CycleLimit}" : $"Cycle {_seasonalDutyController.CompletedCycles + 1}");
@ -161,8 +140,7 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
ImGui.TextColored(in col2, text3);
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
DisabledDisposable val5 = ImRaii.Disabled(true);
try
using (ImRaii.Disabled(disabled: true))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -170,18 +148,13 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
ImGui.SetNextItemWidth(100f);
ImGui.InputInt("##CycleLimitRunning", ref _cycleLimit, 1, 5);
}
finally
{
((IDisposable)val5)?.Dispose();
}
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY() + 4f);
ImGui.Spacing();
}
private void DrawControlsStrip()
{
DisabledDisposable val = ImRaii.Disabled(_seasonalDutyController.IsRunning);
try
using (ImRaii.Disabled(_seasonalDutyController.IsRunning))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -195,10 +168,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.DalamudGrey, (_cycleLimit == 0) ? "(unlimited)" : "");
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.Spacing();
}
@ -240,9 +209,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
private void DrawDutyTable()
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
List<SeasonalDutyDefinition> list = _seasonalDutyDefinitionRegistry.Definitions.Values.OrderBy(delegate(SeasonalDutyDefinition d)
{
DateTime? eventExpiry = d.EventExpiry;
@ -270,49 +236,40 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
return double.MaxValue;
}).ThenBy<SeasonalDutyDefinition, string>((SeasonalDutyDefinition d) => d.Name, StringComparer.OrdinalIgnoreCase)
.ToList();
TableDisposable val = ImRaii.Table((ImU8String)"SeasonalDutyTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("SeasonalDutyTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
if (!tableDisposable)
{
if (!val)
{
return;
}
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (SeasonalDutyDefinition item in list)
{
ImGui.TableNextRow();
bool flag = _seasonalDutyController.IsRunning && _seasonalDutyController.CurrentDuty == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(0f, 0.85f, 0.3f, w)));
}
ImGui.TableNextColumn();
DrawDutyRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Name);
ImGui.TableNextColumn();
DrawDutyRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _seasonalDutyController.IsRunning || _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawDutyRowActions(item, disabled);
}
return;
}
finally
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (SeasonalDutyDefinition item in list)
{
((TableDisposable)(ref val)).Dispose();
ImGui.TableNextRow();
bool flag = _seasonalDutyController.IsRunning && _seasonalDutyController.CurrentDuty == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(0f, 0.85f, 0.3f, w)));
}
ImGui.TableNextColumn();
DrawDutyRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Name);
ImGui.TableNextColumn();
DrawDutyRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _seasonalDutyController.IsRunning || _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawDutyRowActions(item, disabled);
}
}
private void DrawDutyRowName(SeasonalDutyDefinition duty, bool isActive)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
if (isActive)
{
float num = (float)ImGui.GetTime();
@ -327,8 +284,7 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
{
return;
}
TooltipDisposable val = ImRaii.Tooltip();
try
using (ImRaii.Tooltip())
{
ImGui.TextColored(ImGuiColors.DalamudWhite, duty.Name);
ImGui.Separator();
@ -351,10 +307,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
}
}
}
finally
{
((TooltipDisposable)(ref val)).Dispose();
}
}
private static void DrawDutyRowExpiry(SeasonalDutyDefinition duty)
@ -383,23 +335,17 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
private void DrawDutyRowActions(SeasonalDutyDefinition duty, bool disabled)
{
bool flag = duty.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(duty.RequiredQuestId.Value));
ImU8String imU8String = new ImU8String(5, 1);
imU8String.AppendLiteral("duty_");
imU8String.AppendFormatted(duty.Name);
IdDisposable val = ImRaii.PushId(imU8String, true);
try
ImU8String id = new ImU8String(5, 1);
id.AppendLiteral("duty_");
id.AppendFormatted(duty.Name);
using (ImRaii.PushId(id))
{
if (flag)
{
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
}
finally
{
((IDisposable)val2)?.Dispose();
}
if (ImGui.IsItemHovered())
{
IQuestInfo questInfo;
@ -412,8 +358,7 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
}
return;
}
DisabledDisposable val3 = ImRaii.Disabled(disabled);
try
using (ImRaii.Disabled(disabled))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{
@ -424,10 +369,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
_seasonalDutyController.Start(duty, cycleLimit);
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
if (_seasonalDutyController.IsRunning)
@ -444,10 +385,6 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
}
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
private static string FormatElapsed(TimeSpan elapsed)