diff --git a/LLib/LLib.GameUI/LAtkValue.cs b/LLib/LLib.GameUI/LAtkValue.cs index 2363798..4c97992 100644 --- a/LLib/LLib.GameUI/LAtkValue.cs +++ b/LLib/LLib.GameUI/LAtkValue.cs @@ -8,8 +8,7 @@ public static class LAtkValue { public unsafe static string? ReadAtkString(this AtkValue atkValue) { - //IL_0001: Unknown result type (might be due to invalid IL or missing references) - if ((int)atkValue.Type == 0) + if (atkValue.Type == AtkValueType.Undefined) { return null; } diff --git a/LLib/LLib.Shop/GrandCompanyShop.cs b/LLib/LLib.Shop/GrandCompanyShop.cs index 2803480..4e24782 100644 --- a/LLib/LLib.Shop/GrandCompanyShop.cs +++ b/LLib/LLib.Shop/GrandCompanyShop.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.CompilerServices; using Dalamud.Game.Addon.Lifecycle; using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; using Dalamud.Plugin.Services; @@ -223,11 +222,10 @@ public sealed class GrandCompanyShop : IDisposable private unsafe void FireCallback(AtkUnitBase* addon, params int[] args) { - //IL_001e: Unknown result type (might be due to invalid IL or missing references) AtkValue* ptr = stackalloc AtkValue[args.Length]; for (int i = 0; i < args.Length; i++) { - Unsafe.Write(&ptr[i].Type, (AtkValueType)3); + ptr[i].Type = AtkValueType.Int; ptr[i].Int = args[i]; } addon->FireCallback((uint)args.Length, ptr); @@ -235,64 +233,48 @@ public sealed class GrandCompanyShop : IDisposable private unsafe void FirePurchaseCallback(AtkUnitBase* addon, GrandCompanyItem item) { - //IL_000f: Unknown result type (might be due to invalid IL or missing references) - //IL_0024: Unknown result type (might be due to invalid IL or missing references) - //IL_0048: Unknown result type (might be due to invalid IL or missing references) - //IL_006a: Unknown result type (might be due to invalid IL or missing references) - //IL_008c: Unknown result type (might be due to invalid IL or missing references) - //IL_00ae: Unknown result type (might be due to invalid IL or missing references) - //IL_00d0: Unknown result type (might be due to invalid IL or missing references) - //IL_00f7: Unknown result type (might be due to invalid IL or missing references) - //IL_011e: Unknown result type (might be due to invalid IL or missing references) AtkValue* ptr = stackalloc AtkValue[9]; - Unsafe.Write(&ptr->Type, (AtkValueType)3); + ptr->Type = AtkValueType.Int; ptr->Int = 0; - Unsafe.Write(&ptr[1].Type, (AtkValueType)3); + ptr[1].Type = AtkValueType.Int; ptr[1].Int = item.Index; - Unsafe.Write(&ptr[2].Type, (AtkValueType)3); + ptr[2].Type = AtkValueType.Int; ptr[2].Int = 1; - Unsafe.Write(&ptr[3].Type, (AtkValueType)3); + ptr[3].Type = AtkValueType.Int; ptr[3].Int = 0; - Unsafe.Write(&ptr[4].Type, (AtkValueType)3); + ptr[4].Type = AtkValueType.Int; ptr[4].Int = 0; - Unsafe.Write(&ptr[5].Type, (AtkValueType)3); + ptr[5].Type = AtkValueType.Int; ptr[5].Int = 0; - Unsafe.Write(&ptr[6].Type, (AtkValueType)5); + ptr[6].Type = AtkValueType.UInt; ptr[6].UInt = item.ItemId; - Unsafe.Write(&ptr[7].Type, (AtkValueType)5); + ptr[7].Type = AtkValueType.UInt; ptr[7].UInt = item.IconId; - Unsafe.Write(&ptr[8].Type, (AtkValueType)5); + ptr[8].Type = AtkValueType.UInt; ptr[8].UInt = item.SealCost; addon->FireCallback(9u, ptr); } private unsafe static void ClickYes(AtkUnitBase* addon) { - //IL_000e: Unknown result type (might be due to invalid IL or missing references) AtkValue* ptr = stackalloc AtkValue[1]; - Unsafe.Write(&ptr->Type, (AtkValueType)3); + ptr->Type = AtkValueType.Int; ptr->Int = 0; addon->FireCallback(1u, ptr); } private unsafe static int GetAtkValueInt(AtkUnitBase* addon, int index) { - //IL_0035: Unknown result type (might be due to invalid IL or missing references) - //IL_003a: Unknown result type (might be due to invalid IL or missing references) - //IL_003b: Unknown result type (might be due to invalid IL or missing references) - //IL_003d: Unknown result type (might be due to invalid IL or missing references) - //IL_0053: Expected I4, but got Unknown if (addon == null || addon->AtkValues == null || index < 0 || index >= addon->AtkValuesCount) { return -1; } AtkValue atkValue = addon->AtkValues[index]; - AtkValueType type = atkValue.Type; - return (type - 2) switch + return atkValue.Type switch { - 1 => atkValue.Int, - 3 => (int)atkValue.UInt, - 0 => (atkValue.Byte != 0) ? 1 : 0, + AtkValueType.Int => atkValue.Int, + AtkValueType.UInt => (int)atkValue.UInt, + AtkValueType.Bool => (atkValue.Byte != 0) ? 1 : 0, _ => -1, }; } diff --git a/LLib/LLib.Shop/RegularShopBase.cs b/LLib/LLib.Shop/RegularShopBase.cs index 1006416..f0a83fb 100644 --- a/LLib/LLib.Shop/RegularShopBase.cs +++ b/LLib/LLib.Shop/RegularShopBase.cs @@ -93,7 +93,7 @@ public class RegularShopBase address->GetPosition(&num, &num2); ushort num3 = 0; ushort num4 = 0; - address->GetSize(&num3, &num4, true); + address->GetSize(&num3, &num4, scaled: true); num += (short)num3; Vector2? position = _parentWindow.Position; if (position.HasValue) diff --git a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs index be01124..5738d0c 100644 --- a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs +++ b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs @@ -140,6 +140,7 @@ public static class AssemblyQuestLoader LoadQuests106(); LoadQuests107(); LoadQuests108(); + LoadQuests109(); } private static void LoadQuests0() @@ -382763,7 +382764,7 @@ public static class AssemblyQuestLoader num = 1; List list194 = new List(num); CollectionsMarshal.SetCount(list194, num); - CollectionsMarshal.AsSpan(list194)[0] = "Theo"; + CollectionsMarshal.AsSpan(list194)[0] = "WigglyMuffin"; questRoot22.Author = list194; num = 2; List list195 = new List(num); @@ -382799,7 +382800,10 @@ public static class AssemblyQuestLoader num2 = 1; List list197 = new List(num2); CollectionsMarshal.SetCount(list197, num2); - CollectionsMarshal.AsSpan(list197)[0] = new QuestStep(EInteractionType.CompleteQuest, 1054331u, new Vector3(-322.80463f, 18.201778f, -97.88666f), 1190); + CollectionsMarshal.AsSpan(list197)[0] = new QuestStep(EInteractionType.CompleteQuest, 1054331u, new Vector3(-322.80463f, 18.201778f, -97.88666f), 1190) + { + NextQuestId = new QuestId(5329) + }; obj131.Steps = list197; reference150 = obj131; questRoot22.QuestSequence = list195; @@ -382809,7 +382813,7 @@ public static class AssemblyQuestLoader num = 1; List list198 = new List(num); CollectionsMarshal.SetCount(list198, num); - CollectionsMarshal.AsSpan(list198)[0] = "Theo"; + CollectionsMarshal.AsSpan(list198)[0] = "WigglyMuffin"; questRoot23.Author = list198; num = 4; List list199 = new List(num); @@ -382883,7 +382887,8 @@ public static class AssemblyQuestLoader { InSameTerritory = true } - } + }, + NextQuestId = new QuestId(5479) }; obj135.Steps = list203; reference154 = obj135; @@ -394300,4 +394305,891 @@ public static class AssemblyQuestLoader questRoot27.QuestSequence = list321; AddQuest(questId27, questRoot27); } + + private static void LoadQuests109() + { + QuestId questId = new QuestId(5470); + QuestRoot questRoot = new QuestRoot(); + int num = 1; + List list = new List(num); + CollectionsMarshal.SetCount(list, num); + CollectionsMarshal.AsSpan(list)[0] = "WigglyMuffin"; + questRoot.Author = list; + num = 5; + List list2 = new List(num); + CollectionsMarshal.SetCount(list2, num); + Span span = CollectionsMarshal.AsSpan(list2); + ref QuestSequence reference = ref span[0]; + QuestSequence obj = new QuestSequence + { + Sequence = 0 + }; + int num2 = 1; + List list3 = new List(num2); + CollectionsMarshal.SetCount(list3, num2); + CollectionsMarshal.AsSpan(list3)[0] = new QuestStep(EInteractionType.AcceptQuest, 1056202u, new Vector3(14.938599f, 38.806587f, -408.74347f), 1186) + { + AetheryteShortcut = EAetheryteLocation.SolutionNine, + AethernetShortcut = new AethernetShortcut + { + From = EAetheryteLocation.SolutionNine, + To = EAetheryteLocation.SolutionNineResolution + } + }; + obj.Steps = list3; + reference = obj; + ref QuestSequence reference2 = ref span[1]; + QuestSequence obj2 = new QuestSequence + { + Sequence = 1 + }; + num2 = 2; + List list4 = new List(num2); + CollectionsMarshal.SetCount(list4, num2); + Span span2 = CollectionsMarshal.AsSpan(list4); + span2[0] = new QuestStep(EInteractionType.Interact, 1054936u, new Vector3(-57.41974f, 42.8066f, -546.7765f), 1186) + { + TargetTerritoryId = (ushort)1299 + }; + span2[1] = new QuestStep(EInteractionType.Interact, 1058782u, new Vector3(4.043579f, 1.1999818f, 41.61133f), 1299); + obj2.Steps = list4; + reference2 = obj2; + ref QuestSequence reference3 = ref span[2]; + QuestSequence obj3 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list5 = new List(num2); + CollectionsMarshal.SetCount(list5, num2); + CollectionsMarshal.AsSpan(list5)[0] = new QuestStep(EInteractionType.Interact, 1038588u, new Vector3(-101.76245f, 4.357501f, 0.7476196f), 962) + { + AetheryteShortcut = EAetheryteLocation.OldSharlayan, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + obj3.Steps = list5; + reference3 = obj3; + ref QuestSequence reference4 = ref span[3]; + QuestSequence obj4 = new QuestSequence + { + Sequence = 3 + }; + num2 = 2; + List list6 = new List(num2); + CollectionsMarshal.SetCount(list6, num2); + Span span3 = CollectionsMarshal.AsSpan(list6); + span3[0] = new QuestStep(EInteractionType.Interact, 2011936u, new Vector3(-108.56799f, 5.0201416f, 4.5318604f), 962) + { + TargetTerritoryId = (ushort)987 + }; + span3[1] = new QuestStep(EInteractionType.Interact, 2015337u, new Vector3(0.008126731f, 1.907349E-06f, -8.997082f), 987); + obj4.Steps = list6; + reference4 = obj4; + ref QuestSequence reference5 = ref span[4]; + QuestSequence obj5 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list7 = new List(num2); + CollectionsMarshal.SetCount(list7, num2); + CollectionsMarshal.AsSpan(list7)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058789u, new Vector3(-0.045776367f, 1.9073486E-06f, 1.3884888f), 987); + obj5.Steps = list7; + reference5 = obj5; + questRoot.QuestSequence = list2; + AddQuest(questId, questRoot); + QuestId questId2 = new QuestId(5471); + QuestRoot questRoot2 = new QuestRoot(); + num = 1; + List list8 = new List(num); + CollectionsMarshal.SetCount(list8, num); + CollectionsMarshal.AsSpan(list8)[0] = "WigglyMuffin"; + questRoot2.Author = list8; + num = 5; + List list9 = new List(num); + CollectionsMarshal.SetCount(list9, num); + Span span4 = CollectionsMarshal.AsSpan(list9); + ref QuestSequence reference6 = ref span4[0]; + QuestSequence obj6 = new QuestSequence + { + Sequence = 0 + }; + num2 = 1; + List list10 = new List(num2); + CollectionsMarshal.SetCount(list10, num2); + CollectionsMarshal.AsSpan(list10)[0] = new QuestStep(EInteractionType.AcceptQuest, 1058790u, new Vector3(-1.1750488f, 1.9073486E-06f, -0.289917f), 987); + obj6.Steps = list10; + reference6 = obj6; + ref QuestSequence reference7 = ref span4[1]; + QuestSequence obj7 = new QuestSequence + { + Sequence = 1 + }; + num2 = 1; + List list11 = new List(num2); + CollectionsMarshal.SetCount(list11, num2); + CollectionsMarshal.AsSpan(list11)[0] = new QuestStep(EInteractionType.Interact, 1058791u, new Vector3(531.6395f, -36.65f, -231.49463f), 958) + { + AetheryteShortcut = EAetheryteLocation.GarlemaldTertium, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + obj7.Steps = list11; + reference7 = obj7; + ref QuestSequence reference8 = ref span4[2]; + QuestSequence obj8 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list12 = new List(num2); + CollectionsMarshal.SetCount(list12, num2); + CollectionsMarshal.AsSpan(list12)[0] = new QuestStep(EInteractionType.Duty, null, null, 958) + { + DutyOptions = new DutyOptions + { + Enabled = true, + ContentFinderConditionId = 1011u + } + }; + obj8.Steps = list12; + reference8 = obj8; + span4[3] = new QuestSequence + { + Sequence = 3 + }; + ref QuestSequence reference9 = ref span4[4]; + QuestSequence obj9 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list13 = new List(num2); + CollectionsMarshal.SetCount(list13, num2); + CollectionsMarshal.AsSpan(list13)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058801u, new Vector3(533.4706f, -36.65f, -228.56494f), 958); + obj9.Steps = list13; + reference9 = obj9; + questRoot2.QuestSequence = list9; + AddQuest(questId2, questRoot2); + QuestId questId3 = new QuestId(5472); + QuestRoot questRoot3 = new QuestRoot(); + num = 1; + List list14 = new List(num); + CollectionsMarshal.SetCount(list14, num); + CollectionsMarshal.AsSpan(list14)[0] = "WigglyMuffin"; + questRoot3.Author = list14; + num = 9; + List list15 = new List(num); + CollectionsMarshal.SetCount(list15, num); + Span span5 = CollectionsMarshal.AsSpan(list15); + ref QuestSequence reference10 = ref span5[0]; + QuestSequence obj10 = new QuestSequence + { + Sequence = 0 + }; + num2 = 2; + List list16 = new List(num2); + CollectionsMarshal.SetCount(list16, num2); + Span span6 = CollectionsMarshal.AsSpan(list16); + span6[0] = new QuestStep(EInteractionType.AcceptQuest, 1058804u, new Vector3(531.3954f, -36.65f, -231.95245f), 958) + { + AetheryteShortcut = EAetheryteLocation.GarlemaldTertium, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + span6[1] = new QuestStep(EInteractionType.AcceptQuest, 1056141u, new Vector3(-7.5532227f, -0.003462526f, -7.950012f), 1334); + obj10.Steps = list16; + reference10 = obj10; + ref QuestSequence reference11 = ref span5[1]; + QuestSequence obj11 = new QuestSequence + { + Sequence = 1 + }; + num2 = 1; + List list17 = new List(num2); + CollectionsMarshal.SetCount(list17, num2); + ref QuestStep reference12 = ref CollectionsMarshal.AsSpan(list17)[0]; + QuestStep obj12 = new QuestStep(EInteractionType.Combat, null, new Vector3(-19.821533f, 57.32972f, 88.0293f), 959) + { + StopDistance = 0.5f, + Fly = true, + EnemySpawnType = EEnemySpawnType.AutoOnEnterArea + }; + int num3 = 3; + List list18 = new List(num3); + CollectionsMarshal.SetCount(list18, num3); + Span span7 = CollectionsMarshal.AsSpan(list18); + span7[0] = 20055u; + span7[1] = 20056u; + span7[2] = 20057u; + obj12.KillEnemyDataIds = list18; + reference12 = obj12; + obj11.Steps = list17; + reference11 = obj11; + ref QuestSequence reference13 = ref span5[2]; + QuestSequence obj13 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list19 = new List(num2); + CollectionsMarshal.SetCount(list19, num2); + CollectionsMarshal.AsSpan(list19)[0] = new QuestStep(EInteractionType.Interact, 1058809u, new Vector3(-19.821533f, 57.32972f, 88.0293f), 959); + obj13.Steps = list19; + reference13 = obj13; + ref QuestSequence reference14 = ref span5[3]; + QuestSequence obj14 = new QuestSequence + { + Sequence = 3 + }; + num2 = 1; + List list20 = new List(num2); + CollectionsMarshal.SetCount(list20, num2); + ref QuestStep reference15 = ref CollectionsMarshal.AsSpan(list20)[0]; + QuestStep obj15 = new QuestStep(EInteractionType.Combat, null, new Vector3(-187.36554f, 57.16567f, 411.24585f), 959) + { + StopDistance = 0.5f, + Fly = true, + EnemySpawnType = EEnemySpawnType.AutoOnEnterArea + }; + num3 = 1; + List list21 = new List(num3); + CollectionsMarshal.SetCount(list21, num3); + CollectionsMarshal.AsSpan(list21)[0] = 20058u; + obj15.KillEnemyDataIds = list21; + reference15 = obj15; + obj14.Steps = list20; + reference14 = obj14; + ref QuestSequence reference16 = ref span5[4]; + QuestSequence obj16 = new QuestSequence + { + Sequence = 4 + }; + num2 = 1; + List list22 = new List(num2); + CollectionsMarshal.SetCount(list22, num2); + CollectionsMarshal.AsSpan(list22)[0] = new QuestStep(EInteractionType.Interact, 1058812u, new Vector3(-187.36554f, 57.16567f, 411.24585f), 959); + obj16.Steps = list22; + reference16 = obj16; + span5[5] = new QuestSequence + { + Sequence = 5 + }; + ref QuestSequence reference17 = ref span5[6]; + QuestSequence obj17 = new QuestSequence + { + Sequence = 6 + }; + num2 = 1; + List list23 = new List(num2); + CollectionsMarshal.SetCount(list23, num2); + CollectionsMarshal.AsSpan(list23)[0] = new QuestStep(EInteractionType.Duty, null, null, 1373) + { + DutyOptions = new DutyOptions + { + Enabled = true, + ContentFinderConditionId = 1115u + } + }; + obj17.Steps = list23; + reference17 = obj17; + span5[7] = new QuestSequence + { + Sequence = 7 + }; + ref QuestSequence reference18 = ref span5[8]; + QuestSequence obj18 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list24 = new List(num2); + CollectionsMarshal.SetCount(list24, num2); + CollectionsMarshal.AsSpan(list24)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058818u, new Vector3(28.122314f, 56.632263f, 481.4984f), 1162); + obj18.Steps = list24; + reference18 = obj18; + questRoot3.QuestSequence = list15; + AddQuest(questId3, questRoot3); + QuestId questId4 = new QuestId(5473); + QuestRoot questRoot4 = new QuestRoot(); + num = 1; + List list25 = new List(num); + CollectionsMarshal.SetCount(list25, num); + CollectionsMarshal.AsSpan(list25)[0] = "WigglyMuffin"; + questRoot4.Author = list25; + num = 8; + List list26 = new List(num); + CollectionsMarshal.SetCount(list26, num); + Span span8 = CollectionsMarshal.AsSpan(list26); + ref QuestSequence reference19 = ref span8[0]; + QuestSequence obj19 = new QuestSequence + { + Sequence = 0 + }; + num2 = 1; + List list27 = new List(num2); + CollectionsMarshal.SetCount(list27, num2); + CollectionsMarshal.AsSpan(list27)[0] = new QuestStep(EInteractionType.AcceptQuest, 1058818u, new Vector3(28.122314f, 56.632263f, 481.4984f), 1162); + obj19.Steps = list27; + reference19 = obj19; + ref QuestSequence reference20 = ref span8[1]; + QuestSequence obj20 = new QuestSequence + { + Sequence = 1 + }; + num2 = 1; + List list28 = new List(num2); + CollectionsMarshal.SetCount(list28, num2); + ref QuestStep reference21 = ref CollectionsMarshal.AsSpan(list28)[0]; + QuestStep questStep = new QuestStep(EInteractionType.Interact, 1058821u, new Vector3(7.9804688f, 57.865685f, 429.22095f), 1162); + num3 = 1; + List list29 = new List(num3); + CollectionsMarshal.SetCount(list29, num3); + CollectionsMarshal.AsSpan(list29)[0] = new DialogueChoice + { + Type = EDialogChoiceType.YesNo, + Prompt = new ExcelRef("TEXT_KINGMK104_05473_SYSTEM_000_105") + }; + questStep.DialogueChoices = list29; + reference21 = questStep; + obj20.Steps = list28; + reference20 = obj20; + ref QuestSequence reference22 = ref span8[2]; + QuestSequence obj21 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list30 = new List(num2); + CollectionsMarshal.SetCount(list30, num2); + CollectionsMarshal.AsSpan(list30)[0] = new QuestStep(EInteractionType.Interact, 1058824u, new Vector3(-1.3275757f, -0.40000772f, -59.494934f), 1077); + obj21.Steps = list30; + reference22 = obj21; + ref QuestSequence reference23 = ref span8[3]; + QuestSequence obj22 = new QuestSequence + { + Sequence = 3 + }; + num2 = 1; + List list31 = new List(num2); + CollectionsMarshal.SetCount(list31, num2); + CollectionsMarshal.AsSpan(list31)[0] = new QuestStep(EInteractionType.Interact, 1058827u, new Vector3(-35.996094f, -0.21963452f, 52.353638f), 1077); + obj22.Steps = list31; + reference23 = obj22; + ref QuestSequence reference24 = ref span8[4]; + QuestSequence obj23 = new QuestSequence + { + Sequence = 4 + }; + num2 = 1; + List list32 = new List(num2); + CollectionsMarshal.SetCount(list32, num2); + CollectionsMarshal.AsSpan(list32)[0] = new QuestStep(EInteractionType.Interact, 2015319u, new Vector3(-35.29428f, 0.2805768f, 53.37022f), 1077); + obj23.Steps = list32; + reference24 = obj23; + ref QuestSequence reference25 = ref span8[5]; + QuestSequence obj24 = new QuestSequence + { + Sequence = 5 + }; + num2 = 1; + List list33 = new List(num2); + CollectionsMarshal.SetCount(list33, num2); + CollectionsMarshal.AsSpan(list33)[0] = new QuestStep(EInteractionType.UseItem, 2015321u, new Vector3(128.8068f, 24.30001f, 60.58372f), 1077) + { + ItemId = 2003823u + }; + obj24.Steps = list33; + reference25 = obj24; + ref QuestSequence reference26 = ref span8[6]; + QuestSequence obj25 = new QuestSequence + { + Sequence = 6 + }; + num2 = 1; + List list34 = new List(num2); + CollectionsMarshal.SetCount(list34, num2); + ref QuestStep reference27 = ref CollectionsMarshal.AsSpan(list34)[0]; + QuestStep questStep2 = new QuestStep(EInteractionType.Interact, 1058830u, new Vector3(132.06677f, 24.30001f, 59.830566f), 1077); + num3 = 1; + List list35 = new List(num3); + CollectionsMarshal.SetCount(list35, num3); + CollectionsMarshal.AsSpan(list35)[0] = new DialogueChoice + { + Type = EDialogChoiceType.YesNo, + Prompt = new ExcelRef("TEXT_KINGMK104_05473_SYSTEM_000_502") + }; + questStep2.DialogueChoices = list35; + reference27 = questStep2; + obj25.Steps = list34; + reference26 = obj25; + ref QuestSequence reference28 = ref span8[7]; + QuestSequence obj26 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list36 = new List(num2); + CollectionsMarshal.SetCount(list36, num2); + CollectionsMarshal.AsSpan(list36)[0] = new QuestStep(EInteractionType.CompleteQuest, 1059789u, new Vector3(-21.164307f, -47.543007f, -490.95905f), 959); + obj26.Steps = list36; + reference28 = obj26; + questRoot4.QuestSequence = list26; + AddQuest(questId4, questRoot4); + QuestId questId5 = new QuestId(5474); + QuestRoot questRoot5 = new QuestRoot(); + num = 1; + List list37 = new List(num); + CollectionsMarshal.SetCount(list37, num); + CollectionsMarshal.AsSpan(list37)[0] = "WigglyMuffin"; + questRoot5.Author = list37; + num = 4; + List list38 = new List(num); + CollectionsMarshal.SetCount(list38, num); + Span span9 = CollectionsMarshal.AsSpan(list38); + ref QuestSequence reference29 = ref span9[0]; + QuestSequence obj27 = new QuestSequence + { + Sequence = 0 + }; + num2 = 1; + List list39 = new List(num2); + CollectionsMarshal.SetCount(list39, num2); + CollectionsMarshal.AsSpan(list39)[0] = new QuestStep(EInteractionType.AcceptQuest, 1058834u, new Vector3(-23.941406f, -47.54248f, -490.28766f), 959); + obj27.Steps = list39; + reference29 = obj27; + ref QuestSequence reference30 = ref span9[1]; + QuestSequence obj28 = new QuestSequence + { + Sequence = 1 + }; + num2 = 2; + List list40 = new List(num2); + CollectionsMarshal.SetCount(list40, num2); + Span span10 = CollectionsMarshal.AsSpan(list40); + span10[0] = new QuestStep(EInteractionType.Interact, 2002881u, new Vector3(21.133728f, 22.323914f, -631.281f), 156) + { + TargetTerritoryId = (ushort)351, + AetheryteShortcut = EAetheryteLocation.MorDhona, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + span10[1] = new QuestStep(EInteractionType.Interact, 1058854u, new Vector3(-0.16790771f, 0f, -8.346741f), 351); + obj28.Steps = list40; + reference30 = obj28; + ref QuestSequence reference31 = ref span9[2]; + QuestSequence obj29 = new QuestSequence + { + Sequence = 2 + }; + num2 = 5; + List list41 = new List(num2); + CollectionsMarshal.SetCount(list41, num2); + Span span11 = CollectionsMarshal.AsSpan(list41); + ref QuestStep reference32 = ref span11[0]; + QuestStep questStep3 = new QuestStep(EInteractionType.Interact, 1058842u, new Vector3(4.135132f, 0.009977884f, -4.287842f), 351); + num3 = 6; + List list42 = new List(num3); + CollectionsMarshal.SetCount(list42, num3); + Span span12 = CollectionsMarshal.AsSpan(list42); + span12[0] = null; + span12[1] = null; + span12[2] = null; + span12[3] = null; + span12[4] = null; + span12[5] = new QuestWorkValue((byte)4, null, EQuestWorkMode.Bitwise); + questStep3.CompletionQuestVariablesFlags = list42; + reference32 = questStep3; + ref QuestStep reference33 = ref span11[1]; + QuestStep questStep4 = new QuestStep(EInteractionType.Interact, 1058850u, new Vector3(9.47583f, 0.009977883f, -4.5625f), 351); + num3 = 6; + List list43 = new List(num3); + CollectionsMarshal.SetCount(list43, num3); + Span span13 = CollectionsMarshal.AsSpan(list43); + span13[0] = null; + span13[1] = null; + span13[2] = null; + span13[3] = null; + span13[4] = null; + span13[5] = new QuestWorkValue((byte)4, (byte)8, EQuestWorkMode.Bitwise); + questStep4.CompletionQuestVariablesFlags = list43; + reference33 = questStep4; + ref QuestStep reference34 = ref span11[2]; + QuestStep questStep5 = new QuestStep(EInteractionType.Interact, 1058843u, new Vector3(3.40271f, 0f, -8.590881f), 351); + num3 = 6; + List list44 = new List(num3); + CollectionsMarshal.SetCount(list44, num3); + Span span14 = CollectionsMarshal.AsSpan(list44); + span14[0] = null; + span14[1] = null; + span14[2] = null; + span14[3] = null; + span14[4] = null; + span14[5] = new QuestWorkValue((byte)6, (byte)8, EQuestWorkMode.Bitwise); + questStep5.CompletionQuestVariablesFlags = list44; + reference34 = questStep5; + ref QuestStep reference35 = ref span11[3]; + QuestStep questStep6 = new QuestStep(EInteractionType.Interact, 1058841u, new Vector3(-3.0975952f, 0.018040119f, -10.086243f), 351); + num3 = 6; + List list45 = new List(num3); + CollectionsMarshal.SetCount(list45, num3); + Span span15 = CollectionsMarshal.AsSpan(list45); + span15[0] = null; + span15[1] = null; + span15[2] = null; + span15[3] = null; + span15[4] = null; + span15[5] = new QuestWorkValue((byte)14, (byte)8, EQuestWorkMode.Bitwise); + questStep6.CompletionQuestVariablesFlags = list45; + reference35 = questStep6; + span11[4] = new QuestStep(EInteractionType.Interact, 1058844u, new Vector3(-6.240967f, 0.009977883f, -4.867676f), 351); + obj29.Steps = list41; + reference31 = obj29; + ref QuestSequence reference36 = ref span9[3]; + QuestSequence obj30 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list46 = new List(num2); + CollectionsMarshal.SetCount(list46, num2); + CollectionsMarshal.AsSpan(list46)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058861u, new Vector3(-0.015319824f, 0f, -7.2175903f), 351); + obj30.Steps = list46; + reference36 = obj30; + questRoot5.QuestSequence = list38; + AddQuest(questId5, questRoot5); + QuestId questId6 = new QuestId(5479); + QuestRoot questRoot6 = new QuestRoot(); + num = 1; + List list47 = new List(num); + CollectionsMarshal.SetCount(list47, num); + CollectionsMarshal.AsSpan(list47)[0] = "WigglyMuffin"; + questRoot6.Author = list47; + num = 7; + List list48 = new List(num); + CollectionsMarshal.SetCount(list48, num); + Span span16 = CollectionsMarshal.AsSpan(list48); + ref QuestSequence reference37 = ref span16[0]; + QuestSequence obj31 = new QuestSequence + { + Sequence = 0 + }; + num2 = 1; + List list49 = new List(num2); + CollectionsMarshal.SetCount(list49, num2); + CollectionsMarshal.AsSpan(list49)[0] = new QuestStep(EInteractionType.AcceptQuest, 1054357u, new Vector3(141.2832f, 42f, -351.9494f), 1185) + { + AetheryteShortcut = EAetheryteLocation.Tuliyollal, + AethernetShortcut = new AethernetShortcut + { + From = EAetheryteLocation.Tuliyollal, + To = EAetheryteLocation.TuliyollalBrightploomPost + }, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + obj31.Steps = list49; + reference37 = obj31; + ref QuestSequence reference38 = ref span16[1]; + QuestSequence obj32 = new QuestSequence + { + Sequence = 1 + }; + num2 = 1; + List list50 = new List(num2); + CollectionsMarshal.SetCount(list50, num2); + CollectionsMarshal.AsSpan(list50)[0] = new QuestStep(EInteractionType.Interact, 1058885u, new Vector3(-262.92822f, 32f, -658.2894f), 1191) + { + Fly = true, + AetheryteShortcut = EAetheryteLocation.HeritageFoundTheOutskirts + }; + obj32.Steps = list50; + reference38 = obj32; + ref QuestSequence reference39 = ref span16[2]; + QuestSequence obj33 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list51 = new List(num2); + CollectionsMarshal.SetCount(list51, num2); + CollectionsMarshal.AsSpan(list51)[0] = new QuestStep(EInteractionType.Interact, 1058889u, new Vector3(464.8661f, -150.9661f, 473.10596f), 1189) + { + Fly = true, + AetheryteShortcut = EAetheryteLocation.YakTelMamook + }; + obj33.Steps = list51; + reference39 = obj33; + ref QuestSequence reference40 = ref span16[3]; + QuestSequence obj34 = new QuestSequence + { + Sequence = 3 + }; + num2 = 2; + List list52 = new List(num2); + CollectionsMarshal.SetCount(list52, num2); + Span span17 = CollectionsMarshal.AsSpan(list52); + span17[0] = new QuestStep(EInteractionType.Interact, 2014450u, new Vector3(-528.37415f, -152.20874f, 671.13745f), 1189) + { + TargetTerritoryId = (ushort)1265, + Fly = true + }; + span17[1] = new QuestStep(EInteractionType.Interact, 1058894u, new Vector3(-11.062805f, 41.999992f, -5.0202637f), 1265); + obj34.Steps = list52; + reference40 = obj34; + ref QuestSequence reference41 = ref span16[4]; + QuestSequence obj35 = new QuestSequence + { + Sequence = 4 + }; + num2 = 1; + List list53 = new List(num2); + CollectionsMarshal.SetCount(list53, num2); + CollectionsMarshal.AsSpan(list53)[0] = new QuestStep(EInteractionType.Duty, null, null, 1265) + { + DutyOptions = new DutyOptions + { + ContentFinderConditionId = 1117u + } + }; + obj35.Steps = list53; + reference41 = obj35; + span16[5] = new QuestSequence + { + Sequence = 5 + }; + ref QuestSequence reference42 = ref span16[6]; + QuestSequence obj36 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list54 = new List(num2); + CollectionsMarshal.SetCount(list54, num2); + CollectionsMarshal.AsSpan(list54)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058898u, new Vector3(-2.8534546f, 41.999977f, 1.7852783f), 1265) + { + NextQuestId = new QuestId(5480) + }; + obj36.Steps = list54; + reference42 = obj36; + questRoot6.QuestSequence = list48; + AddQuest(questId6, questRoot6); + QuestId questId7 = new QuestId(5480); + QuestRoot questRoot7 = new QuestRoot(); + num = 1; + List list55 = new List(num); + CollectionsMarshal.SetCount(list55, num); + CollectionsMarshal.AsSpan(list55)[0] = "WigglyMuffin"; + questRoot7.Author = list55; + num = 11; + List list56 = new List(num); + CollectionsMarshal.SetCount(list56, num); + Span span18 = CollectionsMarshal.AsSpan(list56); + ref QuestSequence reference43 = ref span18[0]; + QuestSequence obj37 = new QuestSequence + { + Sequence = 0 + }; + num2 = 1; + List list57 = new List(num2); + CollectionsMarshal.SetCount(list57, num2); + CollectionsMarshal.AsSpan(list57)[0] = new QuestStep(EInteractionType.AcceptQuest, 1058898u, new Vector3(-2.8534546f, 41.999977f, 1.7852783f), 1265); + obj37.Steps = list57; + reference43 = obj37; + ref QuestSequence reference44 = ref span18[1]; + QuestSequence obj38 = new QuestSequence + { + Sequence = 1 + }; + num2 = 1; + List list58 = new List(num2); + CollectionsMarshal.SetCount(list58, num2); + CollectionsMarshal.AsSpan(list58)[0] = new QuestStep(EInteractionType.Interact, 1058924u, new Vector3(469.65735f, -150.94077f, 473.1975f), 1189) + { + Fly = true, + AetheryteShortcut = EAetheryteLocation.YakTelMamook, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + obj38.Steps = list58; + reference44 = obj38; + ref QuestSequence reference45 = ref span18[2]; + QuestSequence obj39 = new QuestSequence + { + Sequence = 2 + }; + num2 = 1; + List list59 = new List(num2); + CollectionsMarshal.SetCount(list59, num2); + CollectionsMarshal.AsSpan(list59)[0] = new QuestStep(EInteractionType.Interact, 1058902u, new Vector3(-622.6444f, -182.22296f, 553.30725f), 1189); + obj39.Steps = list59; + reference45 = obj39; + ref QuestSequence reference46 = ref span18[3]; + QuestSequence obj40 = new QuestSequence + { + Sequence = 3 + }; + num2 = 1; + List list60 = new List(num2); + CollectionsMarshal.SetCount(list60, num2); + CollectionsMarshal.AsSpan(list60)[0] = new QuestStep(EInteractionType.Interact, 1058905u, new Vector3(686.7628f, -137.174f, 497.15417f), 1189); + obj40.Steps = list60; + reference46 = obj40; + ref QuestSequence reference47 = ref span18[4]; + QuestSequence obj41 = new QuestSequence + { + Sequence = 4 + }; + num2 = 1; + List list61 = new List(num2); + CollectionsMarshal.SetCount(list61, num2); + CollectionsMarshal.AsSpan(list61)[0] = new QuestStep(EInteractionType.Interact, 1058908u, new Vector3(-410.94073f, 3f, -60.16632f), 1185) + { + AetheryteShortcut = EAetheryteLocation.Tuliyollal, + AethernetShortcut = new AethernetShortcut + { + From = EAetheryteLocation.Tuliyollal, + To = EAetheryteLocation.TuliyollalDirigibleLanding + } + }; + obj41.Steps = list61; + reference47 = obj41; + ref QuestSequence reference48 = ref span18[5]; + QuestSequence obj42 = new QuestSequence + { + Sequence = 5 + }; + num2 = 1; + List list62 = new List(num2); + CollectionsMarshal.SetCount(list62, num2); + CollectionsMarshal.AsSpan(list62)[0] = new QuestStep(EInteractionType.Interact, 1054357u, new Vector3(141.2832f, 42f, -351.9494f), 1185) + { + AethernetShortcut = new AethernetShortcut + { + From = EAetheryteLocation.TuliyollalDirigibleLanding, + To = EAetheryteLocation.TuliyollalBrightploomPost + } + }; + obj42.Steps = list62; + reference48 = obj42; + ref QuestSequence reference49 = ref span18[6]; + QuestSequence obj43 = new QuestSequence + { + Sequence = 6 + }; + num2 = 2; + List list63 = new List(num2); + CollectionsMarshal.SetCount(list63, num2); + Span span19 = CollectionsMarshal.AsSpan(list63); + span19[0] = new QuestStep(EInteractionType.WalkTo, null, new Vector3(-17.027401f, -19.328289f, 189.65439f), 1185) + { + StopDistance = 0.5f, + AethernetShortcut = new AethernetShortcut + { + From = EAetheryteLocation.TuliyollalBrightploomPost, + To = EAetheryteLocation.TuliyollalTheForardCabins + } + }; + span19[1] = new QuestStep(EInteractionType.Interact, 1058910u, new Vector3(-19.183992f, -19.328289f, 189.95901f), 1185); + obj43.Steps = list63; + reference49 = obj43; + ref QuestSequence reference50 = ref span18[7]; + QuestSequence obj44 = new QuestSequence + { + Sequence = 7 + }; + num2 = 1; + List list64 = new List(num2); + CollectionsMarshal.SetCount(list64, num2); + ref QuestStep reference51 = ref CollectionsMarshal.AsSpan(list64)[0]; + QuestStep questStep7 = new QuestStep(EInteractionType.Interact, 1058912u, new Vector3(-80.27777f, -19.328289f, 185.8396f), 1185); + num3 = 1; + List list65 = new List(num3); + CollectionsMarshal.SetCount(list65, num3); + CollectionsMarshal.AsSpan(list65)[0] = new DialogueChoice + { + Type = EDialogChoiceType.YesNo, + Prompt = new ExcelRef("TEXT_KINGEA302_05480_Q5_000_000") + }; + questStep7.DialogueChoices = list65; + reference51 = questStep7; + obj44.Steps = list64; + reference50 = obj44; + ref QuestSequence reference52 = ref span18[8]; + QuestSequence obj45 = new QuestSequence + { + Sequence = 8 + }; + num2 = 1; + List list66 = new List(num2); + CollectionsMarshal.SetCount(list66, num2); + CollectionsMarshal.AsSpan(list66)[0] = new QuestStep(EInteractionType.Interact, 1058915u, new Vector3(-0.5340576f, 41.999996f, -115.739685f), 1265); + obj45.Steps = list66; + reference52 = obj45; + ref QuestSequence reference53 = ref span18[9]; + QuestSequence obj46 = new QuestSequence + { + Sequence = 9 + }; + num2 = 1; + List list67 = new List(num2); + CollectionsMarshal.SetCount(list67, num2); + CollectionsMarshal.AsSpan(list67)[0] = new QuestStep(EInteractionType.Interact, 1058919u, new Vector3(-2.7314453f, 42f, -112.474304f), 1265); + obj46.Steps = list67; + reference53 = obj46; + ref QuestSequence reference54 = ref span18[10]; + QuestSequence obj47 = new QuestSequence + { + Sequence = byte.MaxValue + }; + num2 = 1; + List list68 = new List(num2); + CollectionsMarshal.SetCount(list68, num2); + CollectionsMarshal.AsSpan(list68)[0] = new QuestStep(EInteractionType.CompleteQuest, 1058927u, new Vector3(567.6814f, -131.41925f, 610.1013f), 1189) + { + AetheryteShortcut = EAetheryteLocation.YakTelMamook, + SkipConditions = new SkipConditions + { + AetheryteShortcutIf = new SkipAetheryteCondition + { + InSameTerritory = true + } + } + }; + obj47.Steps = list68; + reference54 = obj47; + questRoot7.QuestSequence = list56; + AddQuest(questId7, questRoot7); + } } diff --git a/Questionable/Questionable.Controller.GameUi/ChocoboNameHandler.cs b/Questionable/Questionable.Controller.GameUi/ChocoboNameHandler.cs index 247a372..153c662 100644 --- a/Questionable/Questionable.Controller.GameUi/ChocoboNameHandler.cs +++ b/Questionable/Questionable.Controller.GameUi/ChocoboNameHandler.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using Dalamud.Game.Addon.Lifecycle; @@ -114,8 +113,6 @@ internal sealed class ChocoboNameHandler : IDisposable private unsafe void FireInputStringCallback(AtkUnitBase* addon, string text) { - //IL_005b: Unknown result type (might be due to invalid IL or missing references) - //IL_00a1: Unknown result type (might be due to invalid IL or missing references) AtkComponentNode* componentNodeById = addon->GetComponentNodeById(9u); if (componentNodeById == null) { @@ -130,13 +127,13 @@ internal sealed class ChocoboNameHandler : IDisposable } asAtkComponentTextInput->SetText(text); AtkValue* ptr = stackalloc AtkValue[2]; - Unsafe.Write(&ptr->Type, (AtkValueType)3); + ptr->Type = AtkValueType.Int; ptr->Int = 0; byte[] bytes = Encoding.UTF8.GetBytes(text); nint num = Marshal.AllocHGlobal(bytes.Length + 1); Marshal.Copy(bytes, 0, num, bytes.Length); Marshal.WriteByte(num + bytes.Length, 0); - Unsafe.Write(&ptr[1].Type, (AtkValueType)8); + ptr[1].Type = AtkValueType.String; ptr[1].String = (byte*)num; addon->FireCallback(2u, ptr); Marshal.FreeHGlobal(num); @@ -144,9 +141,8 @@ internal sealed class ChocoboNameHandler : IDisposable private unsafe static void ClickYes(AtkUnitBase* addon) { - //IL_000e: Unknown result type (might be due to invalid IL or missing references) AtkValue* ptr = stackalloc AtkValue[1]; - Unsafe.Write(&ptr->Type, (AtkValueType)3); + ptr->Type = AtkValueType.Int; ptr->Int = 0; addon->FireCallback(1u, ptr); } diff --git a/Questionable/Questionable.Controller.GameUi/CraftworksSupplyController.cs b/Questionable/Questionable.Controller.GameUi/CraftworksSupplyController.cs index 67cff8c..26bced9 100644 --- a/Questionable/Questionable.Controller.GameUi/CraftworksSupplyController.cs +++ b/Questionable/Questionable.Controller.GameUi/CraftworksSupplyController.cs @@ -54,8 +54,6 @@ internal sealed class CraftworksSupplyController : IDisposable private unsafe void InteractWithBankaCraftworksSupply(AtkUnitBase* addon) { - //IL_006d: Unknown result type (might be due to invalid IL or missing references) - //IL_0093: Unknown result type (might be due to invalid IL or missing references) AtkValue* atkValues = addon->AtkValues; uint uInt = atkValues[7].UInt; uint num = 6 - uInt; @@ -68,12 +66,12 @@ internal sealed class CraftworksSupplyController : IDisposable { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 2 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = i } }; @@ -90,11 +88,6 @@ internal sealed class CraftworksSupplyController : IDisposable private unsafe void ContextIconMenuPostReceiveEvent(AddonEvent type, AddonArgs args) { - //IL_0084: Unknown result type (might be due to invalid IL or missing references) - //IL_00aa: Unknown result type (might be due to invalid IL or missing references) - //IL_00d3: Unknown result type (might be due to invalid IL or missing references) - //IL_0100: Unknown result type (might be due to invalid IL or missing references) - //IL_0129: Unknown result type (might be due to invalid IL or missing references) if (!ShouldHandleUiInteractions) { return; @@ -117,27 +110,27 @@ internal sealed class CraftworksSupplyController : IDisposable { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 0 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 0 }, new AtkValue { - Type = (AtkValueType)5, + Type = AtkValueType.UInt, UInt = 20802u }, new AtkValue { - Type = (AtkValueType)5, + Type = AtkValueType.UInt, UInt = 0u }, new AtkValue { - Type = (AtkValueType)0, + Type = AtkValueType.Undefined, Int = 0 } }; diff --git a/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs b/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs index 043ba54..0a988f8 100644 --- a/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs +++ b/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs @@ -186,8 +186,6 @@ internal sealed class InteractionUiController : IDisposable private unsafe void SelectStringPostSetup(AddonSelectString* addonSelectString, bool checkAllSteps) { - //IL_004c: Unknown result type (might be due to invalid IL or missing references) - //IL_0052: Invalid comparison between Unknown and I4 if (!ShouldHandleUiInteractions) { return; @@ -200,7 +198,7 @@ internal sealed class InteractionUiController : IDisposable List list = new List(); for (ushort num = 7; num < addonSelectString->AtkUnitBase.AtkValuesCount; num++) { - if ((int)addonSelectString->AtkUnitBase.AtkValues[(int)num].Type == 8) + if (addonSelectString->AtkUnitBase.AtkValues[(int)num].Type == AtkValueType.String) { list.Add(addonSelectString->AtkUnitBase.AtkValues[(int)num].ReadAtkString()); } @@ -874,8 +872,6 @@ internal sealed class InteractionUiController : IDisposable private unsafe void DifficultySelectYesNoPostSetup(AtkUnitBase* addonDifficultySelectYesNo, bool checkAllSteps) { - //IL_00f6: Unknown result type (might be due to invalid IL or missing references) - //IL_011c: Unknown result type (might be due to invalid IL or missing references) if (!_questController.IsRunning) { return; @@ -903,12 +899,12 @@ internal sealed class InteractionUiController : IDisposable { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 0 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = _configuration.SinglePlayerDuties.RetryDifficulty } }; @@ -996,8 +992,6 @@ internal sealed class InteractionUiController : IDisposable private unsafe void PointMenuPostSetup(AtkUnitBase* addonPointMenu) { - //IL_00f5: Unknown result type (might be due to invalid IL or missing references) - //IL_011c: Unknown result type (might be due to invalid IL or missing references) if (!ShouldHandleUiInteractions) { return; @@ -1035,12 +1029,12 @@ internal sealed class InteractionUiController : IDisposable { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 13 }, new AtkValue { - Type = (AtkValueType)5, + Type = AtkValueType.UInt, UInt = num } }; @@ -1060,9 +1054,6 @@ internal sealed class InteractionUiController : IDisposable private unsafe void EasterMowingResultPostSetup(AddonEvent type, AddonArgs args) { - //IL_004d: Unknown result type (might be due to invalid IL or missing references) - //IL_0072: Unknown result type (might be due to invalid IL or missing references) - //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (_seasonalDutyController.IsRunning || ShouldHandleUiInteractions) { _logger.LogInformation("Dismissing EasterMowingResult"); @@ -1071,17 +1062,17 @@ internal sealed class InteractionUiController : IDisposable { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = -1 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 1 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 1 } }; diff --git a/Questionable/Questionable.Controller.GameUi/ShopController.cs b/Questionable/Questionable.Controller.GameUi/ShopController.cs index 8e8ae51..ccc995d 100644 --- a/Questionable/Questionable.Controller.GameUi/ShopController.cs +++ b/Questionable/Questionable.Controller.GameUi/ShopController.cs @@ -137,30 +137,26 @@ internal sealed class ShopController : IDisposable, IShopWindow public unsafe void TriggerPurchase(AtkUnitBase* addonShop, int buyNow) { - //IL_0016: Unknown result type (might be due to invalid IL or missing references) - //IL_003b: Unknown result type (might be due to invalid IL or missing references) - //IL_0072: Unknown result type (might be due to invalid IL or missing references) - //IL_009a: Unknown result type (might be due to invalid IL or missing references) AtkValue* values = stackalloc AtkValue[4] { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 0 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = _shop.ItemForSale.Position }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = buyNow }, new AtkValue { - Type = (AtkValueType)0, + Type = AtkValueType.Undefined, Int = 0 } }; diff --git a/Questionable/Questionable.Controller.Steps.Gathering/TurnInDelivery.cs b/Questionable/Questionable.Controller.Steps.Gathering/TurnInDelivery.cs index fb2f57e..a599366 100644 --- a/Questionable/Questionable.Controller.Steps.Gathering/TurnInDelivery.cs +++ b/Questionable/Questionable.Controller.Steps.Gathering/TurnInDelivery.cs @@ -41,8 +41,6 @@ internal static class TurnInDelivery public unsafe override ETaskResult Update() { - //IL_0180: Unknown result type (might be due to invalid IL or missing references) - //IL_01a6: Unknown result type (might be due to invalid IL or missing references) AgentSatisfactionSupply* ptr = AgentSatisfactionSupply.Instance(); if (ptr == null || !ptr->IsAgentActive()) { @@ -89,12 +87,12 @@ internal static class TurnInDelivery { new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 1 }, new AtkValue { - Type = (AtkValueType)3, + Type = AtkValueType.Int, Int = 1 } }; diff --git a/Questionable/Questionable.Controller.Steps.Interactions/ClearObjectsWithAction.cs b/Questionable/Questionable.Controller.Steps.Interactions/ClearObjectsWithAction.cs index 003a2da..c01bdbf 100644 --- a/Questionable/Questionable.Controller.Steps.Interactions/ClearObjectsWithAction.cs +++ b/Questionable/Questionable.Controller.Steps.Interactions/ClearObjectsWithAction.cs @@ -107,7 +107,7 @@ internal static class ClearObjectsWithAction foreach (IGameObject item in objectTable) { ObjectKind objectKind = item.ObjectKind; - if ((objectKind == ObjectKind.Player || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.Housing) ? true : false) + if ((objectKind == ObjectKind.Pc || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.HousingEventObject) ? true : false) { continue; } @@ -138,7 +138,7 @@ internal static class ClearObjectsWithAction foreach (IGameObject item in objectTable) { ObjectKind objectKind = item.ObjectKind; - if ((objectKind == ObjectKind.Player || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.Housing) ? true : false) + if ((objectKind == ObjectKind.Pc || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.HousingEventObject) ? true : false) { continue; } diff --git a/Questionable/Questionable.Controller.Steps.Movement/MoveToObjectExecutor.cs b/Questionable/Questionable.Controller.Steps.Movement/MoveToObjectExecutor.cs index 54b6e09..783b5ec 100644 --- a/Questionable/Questionable.Controller.Steps.Movement/MoveToObjectExecutor.cs +++ b/Questionable/Questionable.Controller.Steps.Movement/MoveToObjectExecutor.cs @@ -46,7 +46,7 @@ internal sealed class MoveToObjectExecutor(MovementController movementController foreach (IGameObject item in objectTable) { ObjectKind objectKind = item.ObjectKind; - bool flag = ((objectKind == ObjectKind.Player || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.Housing) ? true : false); + bool flag = ((objectKind == ObjectKind.Pc || objectKind - 8 <= ObjectKind.BattleNpc || objectKind == ObjectKind.HousingEventObject) ? true : false); if (!flag && item.BaseId == dataId) { float num3 = Vector3.Distance(gameObject.Position, item.Position); diff --git a/Questionable/Questionable.Controller/CombatController.cs b/Questionable/Questionable.Controller/CombatController.cs index 4a5c846..91f3f60 100644 --- a/Questionable/Questionable.Controller/CombatController.cs +++ b/Questionable/Questionable.Controller/CombatController.cs @@ -415,7 +415,7 @@ internal sealed class CombatController : IDisposable return (Priority: 90, Reason: "KED"); } Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind battleNpcKind = battleNpc.BattleNpcKind; - if ((battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.BattleNpcPart || battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.Enemy) ? true : false) + if ((battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.BNpcPart || battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.Combatant) ? true : false) { uint namePlateIconId = address->NamePlateIconId; if ((namePlateIconId == 60093 || namePlateIconId == 60732) ? true : false) diff --git a/Questionable/Questionable.Controller/MovementController.cs b/Questionable/Questionable.Controller/MovementController.cs index 2296b8e..15894aa 100644 --- a/Questionable/Questionable.Controller/MovementController.cs +++ b/Questionable/Questionable.Controller/MovementController.cs @@ -139,11 +139,11 @@ internal sealed class MovementController : IDisposable get { Task> pathfindTask = _pathfindTask; - if (pathfindTask != null) + if (pathfindTask == null || pathfindTask.IsCompleted) { - return !pathfindTask.IsCompleted; + return _navmeshIpc.IsSimpleMovePathfindInProgress; } - return false; + return true; } } @@ -473,34 +473,20 @@ internal sealed class MovementController : IDisposable to = vector; } PrepareNavigation(type, dataId, to, fly, sprint, stopDistance, verticalStopDistance ?? 1.95f, land, useNavmesh: true); - _logger.LogInformation("Pathfinding to {Destination}", Destination); + _logger.LogInformation("Pathfinding to {Destination} via SimpleMove", Destination); Destination.NavmeshCalculations++; - _cancellationTokenSource = new CancellationTokenSource(); - _cancellationTokenSource.CancelAfter(TimeSpan.FromSeconds(30L)); - Vector3 vector2 = _objectTable[0]?.Position ?? Vector3.Zero; - if (fly && _aetheryteData.CalculateDistance(vector2, _clientState.TerritoryType, EAetheryteLocation.CoerthasCentralHighlandsCampDragonhead) < 11f) + float range = stopDistance ?? 2.8f; + if (!_navmeshIpc.SimplePathfindAndMoveCloseTo(to, fly, range)) { - Vector3 vector = vector2; - vector.Y = vector2.Y + 1f; - vector2 = vector; - _logger.LogInformation("Using modified start position for flying pathfinding: {StartPosition}", vector2.ToString("G", CultureInfo.InvariantCulture)); - } - else if (fly) - { - Vector3 vector = vector2; - vector.Y = vector2.Y + 0.2f; - vector2 = vector; - } - _pathfindStartTime = Environment.TickCount64; - if (fly && land) - { - _logger.LogInformation("Using tolerance-based pathfinding for landing (tolerance: 5.0)"); - _pathfindTask = _navmeshIpc.PathfindWithTolerance(vector2, to, fly, 5f, _cancellationTokenSource.Token); - } - else - { - _pathfindTask = _navmeshIpc.Pathfind(vector2, to, fly, _cancellationTokenSource.Token); + _logger.LogWarning("SimpleMove rejected pathfind request (already in progress), stopping first"); + _navmeshIpc.Stop(); + if (!_navmeshIpc.SimplePathfindAndMoveCloseTo(to, fly, range)) + { + _logger.LogWarning("SimpleMove still rejected after stop"); + } } + MovementStartedAt = DateTime.Now; + StartPlayerInputTracking(); } public void NavigateTo(EMovementType type, uint? dataId, List to, bool fly, bool sprint, float? stopDistance, float? verticalStopDistance = null, bool land = false) diff --git a/Questionable/Questionable.Data/ChangelogData.cs b/Questionable/Questionable.Data/ChangelogData.cs index e81f31c..2493ba6 100644 --- a/Questionable/Questionable.Data/ChangelogData.cs +++ b/Questionable/Questionable.Data/ChangelogData.cs @@ -11,274 +11,273 @@ internal static class ChangelogData static ChangelogData() { - int num = 64; + int num = 66; List list = new List(num); CollectionsMarshal.SetCount(list, num); Span span = CollectionsMarshal.AsSpan(list); ref ChangelogEntry reference = ref span[0]; - DateOnly releaseDate = new DateOnly(2026, 3, 24); - int num2 = 1; + DateOnly releaseDate = new DateOnly(2026, 4, 30); + int num2 = 2; List list2 = new List(num2); CollectionsMarshal.SetCount(list2, num2); - ref ChangeEntry reference2 = ref CollectionsMarshal.AsSpan(list2)[0]; + Span span2 = CollectionsMarshal.AsSpan(list2); + ref ChangeEntry reference2 = ref span2[0]; int num3 = 2; List list3 = new List(num3); CollectionsMarshal.SetCount(list3, num3); - Span span2 = CollectionsMarshal.AsSpan(list3); - span2[0] = "Add duty handling to external and qst"; - span2[1] = "Fix duty farming NPC interact getting stuck after zone transition into duty"; - reference2 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list3); - reference = new ChangelogEntry("7.4.19", releaseDate, list2); - ref ChangelogEntry reference3 = ref span[1]; - DateOnly releaseDate2 = new DateOnly(2026, 3, 24); - num2 = 3; - List list4 = new List(num2); - CollectionsMarshal.SetCount(list4, num2); - Span span3 = CollectionsMarshal.AsSpan(list4); - ref ChangeEntry reference4 = ref span3[0]; + Span span3 = CollectionsMarshal.AsSpan(list3); + span3[0] = "Add Windurst: The Third Walk quests"; + span3[1] = "Add 7.5 MSQ"; + reference2 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list3); + ref ChangeEntry reference3 = ref span2[1]; num3 = 1; - List list5 = new List(num3); - CollectionsMarshal.SetCount(list5, num3); - CollectionsMarshal.AsSpan(list5)[0] = "Add seasonal duty farming system (/qst duty)"; - reference4 = new ChangeEntry(EChangeCategory.Added, "New Features", list5); - ref ChangeEntry reference5 = ref span3[1]; + List list4 = new List(num3); + CollectionsMarshal.SetCount(list4, num3); + CollectionsMarshal.AsSpan(list4)[0] = "Use vnavmesh SimpleMove IPC to fix navmesh hanging the game (temporary fix)"; + reference3 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list4); + reference = new ChangelogEntry("7.5.1", releaseDate, list2); + ref ChangelogEntry reference4 = ref span[1]; + DateOnly releaseDate2 = new DateOnly(2026, 4, 29); + num2 = 1; + List list5 = new List(num2); + CollectionsMarshal.SetCount(list5, num2); + ref ChangeEntry reference5 = ref CollectionsMarshal.AsSpan(list5)[0]; num3 = 1; List list6 = new List(num3); CollectionsMarshal.SetCount(list6, num3); - CollectionsMarshal.AsSpan(list6)[0] = "Add Hatching-tide 2026 quest"; - reference5 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list6); - ref ChangeEntry reference6 = ref span3[2]; - num3 = 1; - List list7 = new List(num3); - CollectionsMarshal.SetCount(list7, num3); - CollectionsMarshal.AsSpan(list7)[0] = "Quest path fixes"; - reference6 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list7); - reference3 = new ChangelogEntry("7.4.18", releaseDate2, list4); - ref ChangelogEntry reference7 = ref span[2]; - DateOnly releaseDate3 = new DateOnly(2026, 3, 1); + CollectionsMarshal.AsSpan(list6)[0] = "Api15"; + reference5 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list6); + reference4 = new ChangelogEntry("7.5.0", releaseDate2, list5); + ref ChangelogEntry reference6 = ref span[2]; + DateOnly releaseDate3 = new DateOnly(2026, 3, 24); num2 = 1; - List list8 = new List(num2); - CollectionsMarshal.SetCount(list8, num2); - ref ChangeEntry reference8 = ref CollectionsMarshal.AsSpan(list8)[0]; + List list7 = new List(num2); + CollectionsMarshal.SetCount(list7, num2); + ref ChangeEntry reference7 = ref CollectionsMarshal.AsSpan(list7)[0]; + num3 = 2; + List list8 = new List(num3); + CollectionsMarshal.SetCount(list8, num3); + Span span4 = CollectionsMarshal.AsSpan(list8); + span4[0] = "Add duty handling to external and qst"; + span4[1] = "Fix duty farming NPC interact getting stuck after zone transition into duty"; + reference7 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list8); + reference6 = new ChangelogEntry("7.4.19", releaseDate3, list7); + ref ChangelogEntry reference8 = ref span[3]; + DateOnly releaseDate4 = new DateOnly(2026, 3, 24); + num2 = 3; + List list9 = new List(num2); + CollectionsMarshal.SetCount(list9, num2); + Span span5 = CollectionsMarshal.AsSpan(list9); + ref ChangeEntry reference9 = ref span5[0]; num3 = 1; - List list9 = new List(num3); - CollectionsMarshal.SetCount(list9, num3); - CollectionsMarshal.AsSpan(list9)[0] = "Quest path fixes"; - reference8 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list9); - reference7 = new ChangelogEntry("7.4.17", releaseDate3, list8); - ref ChangelogEntry reference9 = ref span[3]; - DateOnly releaseDate4 = new DateOnly(2026, 3, 1); - num2 = 1; - List list10 = new List(num2); - CollectionsMarshal.SetCount(list10, num2); - ref ChangeEntry reference10 = ref CollectionsMarshal.AsSpan(list10)[0]; + List list10 = new List(num3); + CollectionsMarshal.SetCount(list10, num3); + CollectionsMarshal.AsSpan(list10)[0] = "Add seasonal duty farming system (/qst duty)"; + reference9 = new ChangeEntry(EChangeCategory.Added, "New Features", list10); + ref ChangeEntry reference10 = ref span5[1]; num3 = 1; List list11 = new List(num3); CollectionsMarshal.SetCount(list11, num3); - CollectionsMarshal.AsSpan(list11)[0] = "Enable TextAdvance, PandorasBox, and Automaton IPC integration during FATE farming"; - reference10 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list11); - reference9 = new ChangelogEntry("7.4.16", releaseDate4, list10); - ref ChangelogEntry reference11 = ref span[4]; - DateOnly releaseDate5 = new DateOnly(2026, 2, 28); + CollectionsMarshal.AsSpan(list11)[0] = "Add Hatching-tide 2026 quest"; + reference10 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list11); + ref ChangeEntry reference11 = ref span5[2]; + num3 = 1; + List list12 = new List(num3); + CollectionsMarshal.SetCount(list12, num3); + CollectionsMarshal.AsSpan(list12)[0] = "Quest path fixes"; + reference11 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list12); + reference8 = new ChangelogEntry("7.4.18", releaseDate4, list9); + ref ChangelogEntry reference12 = ref span[4]; + DateOnly releaseDate5 = new DateOnly(2026, 3, 1); num2 = 1; - List list12 = new List(num2); - CollectionsMarshal.SetCount(list12, num2); - ref ChangeEntry reference12 = ref CollectionsMarshal.AsSpan(list12)[0]; - num3 = 2; - List list13 = new List(num3); - CollectionsMarshal.SetCount(list13, num3); - Span span4 = CollectionsMarshal.AsSpan(list13); - span4[0] = "Fix FATE transform interact task never completing after NPC dialogue"; - span4[1] = "Fix FATE farming loop not detecting completion when NPCs persist after FATE ends"; - reference12 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list13); - reference11 = new ChangelogEntry("7.4.15", releaseDate5, list12); - ref ChangelogEntry reference13 = ref span[5]; - DateOnly releaseDate6 = new DateOnly(2026, 2, 27); - num2 = 2; - List list14 = new List(num2); - CollectionsMarshal.SetCount(list14, num2); - Span span5 = CollectionsMarshal.AsSpan(list14); - ref ChangeEntry reference14 = ref span5[0]; - num3 = 2; - List list15 = new List(num3); - CollectionsMarshal.SetCount(list15, num3); - Span span6 = CollectionsMarshal.AsSpan(list15); - span6[0] = "Added prerequisite quest requirement to FATE farming definitions"; - span6[1] = "Show active FATE in main quest UI and disable quest start during FATE farming"; - reference14 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list15); - ref ChangeEntry reference15 = ref span5[1]; + List list13 = new List(num2); + CollectionsMarshal.SetCount(list13, num2); + ref ChangeEntry reference13 = ref CollectionsMarshal.AsSpan(list13)[0]; + num3 = 1; + List list14 = new List(num3); + CollectionsMarshal.SetCount(list14, num3); + CollectionsMarshal.AsSpan(list14)[0] = "Quest path fixes"; + reference13 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list14); + reference12 = new ChangelogEntry("7.4.17", releaseDate5, list13); + ref ChangelogEntry reference14 = ref span[5]; + DateOnly releaseDate6 = new DateOnly(2026, 3, 1); + num2 = 1; + List list15 = new List(num2); + CollectionsMarshal.SetCount(list15, num2); + ref ChangeEntry reference15 = ref CollectionsMarshal.AsSpan(list15)[0]; num3 = 1; List list16 = new List(num3); CollectionsMarshal.SetCount(list16, num3); - CollectionsMarshal.AsSpan(list16)[0] = "Fixed FATE farming buff expiry and added Curtain Call cleanup on stop"; + CollectionsMarshal.AsSpan(list16)[0] = "Enable TextAdvance, PandorasBox, and Automaton IPC integration during FATE farming"; reference15 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list16); - reference13 = new ChangelogEntry("7.4.14", releaseDate6, list14); + reference14 = new ChangelogEntry("7.4.16", releaseDate6, list15); ref ChangelogEntry reference16 = ref span[6]; - DateOnly releaseDate7 = new DateOnly(2026, 2, 27); + DateOnly releaseDate7 = new DateOnly(2026, 2, 28); num2 = 1; List list17 = new List(num2); CollectionsMarshal.SetCount(list17, num2); ref ChangeEntry reference17 = ref CollectionsMarshal.AsSpan(list17)[0]; - num3 = 1; + num3 = 2; List list18 = new List(num3); CollectionsMarshal.SetCount(list18, num3); - CollectionsMarshal.AsSpan(list18)[0] = "Fixed an issue where FATE actions were not performed during the Little Ladies Day (2026) FATE event"; + Span span6 = CollectionsMarshal.AsSpan(list18); + span6[0] = "Fix FATE transform interact task never completing after NPC dialogue"; + span6[1] = "Fix FATE farming loop not detecting completion when NPCs persist after FATE ends"; reference17 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list18); - reference16 = new ChangelogEntry("7.4.13", releaseDate7, list17); + reference16 = new ChangelogEntry("7.4.15", releaseDate7, list17); ref ChangelogEntry reference18 = ref span[7]; - DateOnly releaseDate8 = new DateOnly(2026, 2, 26); - num2 = 3; + DateOnly releaseDate8 = new DateOnly(2026, 2, 27); + num2 = 2; List list19 = new List(num2); CollectionsMarshal.SetCount(list19, num2); Span span7 = CollectionsMarshal.AsSpan(list19); ref ChangeEntry reference19 = ref span7[0]; - num3 = 3; + num3 = 2; List list20 = new List(num3); CollectionsMarshal.SetCount(list20, num3); Span span8 = CollectionsMarshal.AsSpan(list20); - span8[0] = "Add Saved Presets tab to quest priority window"; - span8[1] = "Add passive FATE handling and per npc ability handling"; - span8[2] = "Add FATE farming support"; - reference19 = new ChangeEntry(EChangeCategory.Added, "New Features", list20); + span8[0] = "Added prerequisite quest requirement to FATE farming definitions"; + span8[1] = "Show active FATE in main quest UI and disable quest start during FATE farming"; + reference19 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list20); ref ChangeEntry reference20 = ref span7[1]; num3 = 1; List list21 = new List(num3); CollectionsMarshal.SetCount(list21, num3); - CollectionsMarshal.AsSpan(list21)[0] = "Add Little Ladies' Day 2026 quests"; - reference20 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list21); - ref ChangeEntry reference21 = ref span7[2]; + CollectionsMarshal.AsSpan(list21)[0] = "Fixed FATE farming buff expiry and added Curtain Call cleanup on stop"; + reference20 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list21); + reference18 = new ChangelogEntry("7.4.14", releaseDate8, list19); + ref ChangelogEntry reference21 = ref span[8]; + DateOnly releaseDate9 = new DateOnly(2026, 2, 27); + num2 = 1; + List list22 = new List(num2); + CollectionsMarshal.SetCount(list22, num2); + ref ChangeEntry reference22 = ref CollectionsMarshal.AsSpan(list22)[0]; num3 = 1; - List list22 = new List(num3); - CollectionsMarshal.SetCount(list22, num3); - CollectionsMarshal.AsSpan(list22)[0] = "Quest path fixes"; - reference21 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list22); - reference18 = new ChangelogEntry("7.4.12", releaseDate8, list19); - ref ChangelogEntry reference22 = ref span[8]; - DateOnly releaseDate9 = new DateOnly(2026, 2, 2); - num2 = 2; - List list23 = new List(num2); - CollectionsMarshal.SetCount(list23, num2); - Span span9 = CollectionsMarshal.AsSpan(list23); - ref ChangeEntry reference23 = ref span9[0]; - num3 = 1; - List list24 = new List(num3); - CollectionsMarshal.SetCount(list24, num3); - CollectionsMarshal.AsSpan(list24)[0] = "Add Valentione's Day 2026 quest (The Icing on the Cake)"; - reference23 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list24); - ref ChangeEntry reference24 = ref span9[1]; - num3 = 2; + List list23 = new List(num3); + CollectionsMarshal.SetCount(list23, num3); + CollectionsMarshal.AsSpan(list23)[0] = "Fixed an issue where FATE actions were not performed during the Little Ladies Day (2026) FATE event"; + reference22 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list23); + reference21 = new ChangelogEntry("7.4.13", releaseDate9, list22); + ref ChangelogEntry reference23 = ref span[9]; + DateOnly releaseDate10 = new DateOnly(2026, 2, 26); + num2 = 3; + List list24 = new List(num2); + CollectionsMarshal.SetCount(list24, num2); + Span span9 = CollectionsMarshal.AsSpan(list24); + ref ChangeEntry reference24 = ref span9[0]; + num3 = 3; List list25 = new List(num3); CollectionsMarshal.SetCount(list25, num3); Span span10 = CollectionsMarshal.AsSpan(list25); - span10[0] = "Updated Duty journal to include missing duty types"; - span10[1] = "Added various missing sequences to quests"; - reference24 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list25); - reference22 = new ChangelogEntry("7.4.11", releaseDate9, list23); - ref ChangelogEntry reference25 = ref span[9]; - DateOnly releaseDate10 = new DateOnly(2026, 1, 18); - num2 = 2; - List list26 = new List(num2); - CollectionsMarshal.SetCount(list26, num2); - Span span11 = CollectionsMarshal.AsSpan(list26); - ref ChangeEntry reference26 = ref span11[0]; - num3 = 5; + span10[0] = "Add Saved Presets tab to quest priority window"; + span10[1] = "Add passive FATE handling and per npc ability handling"; + span10[2] = "Add FATE farming support"; + reference24 = new ChangeEntry(EChangeCategory.Added, "New Features", list25); + ref ChangeEntry reference25 = ref span9[1]; + num3 = 1; + List list26 = new List(num3); + CollectionsMarshal.SetCount(list26, num3); + CollectionsMarshal.AsSpan(list26)[0] = "Add Little Ladies' Day 2026 quests"; + reference25 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list26); + ref ChangeEntry reference26 = ref span9[2]; + num3 = 1; List list27 = new List(num3); CollectionsMarshal.SetCount(list27, num3); - Span span12 = CollectionsMarshal.AsSpan(list27); - span12[0] = "Added quest blacklisting"; - span12[1] = "Added MSQ Priority config"; - span12[2] = "Added Quest priority persistence config"; - span12[3] = "Added Duties tab to Journal"; - span12[4] = "Added GC shop handling and chocobo naming for chocobo quests"; - reference26 = new ChangeEntry(EChangeCategory.Added, "Major Features", list27); - ref ChangeEntry reference27 = ref span11[1]; - num3 = 5; - List list28 = new List(num3); - CollectionsMarshal.SetCount(list28, num3); - Span span13 = CollectionsMarshal.AsSpan(list28); - span13[0] = "Removed PandorasBox dependency and added QTE handling"; - span13[1] = "Removed CBT dependency and added Snipe handling"; - span13[2] = "Added drag reordering to Stop condition quests"; - span13[3] = "Ignore item level requirements if using Unsync config"; - span13[4] = "Setting a Stop quest to Off no longer removes it from the list"; - reference27 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list28); - reference25 = new ChangelogEntry("7.4.10", releaseDate10, list26); - ref ChangelogEntry reference28 = ref span[10]; - DateOnly releaseDate11 = new DateOnly(2025, 12, 31); - num2 = 3; - List list29 = new List(num2); - CollectionsMarshal.SetCount(list29, num2); - Span span14 = CollectionsMarshal.AsSpan(list29); - ref ChangeEntry reference29 = ref span14[0]; + CollectionsMarshal.AsSpan(list27)[0] = "Quest path fixes"; + reference26 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list27); + reference23 = new ChangelogEntry("7.4.12", releaseDate10, list24); + ref ChangelogEntry reference27 = ref span[10]; + DateOnly releaseDate11 = new DateOnly(2026, 2, 2); + num2 = 2; + List list28 = new List(num2); + CollectionsMarshal.SetCount(list28, num2); + Span span11 = CollectionsMarshal.AsSpan(list28); + ref ChangeEntry reference28 = ref span11[0]; num3 = 1; + List list29 = new List(num3); + CollectionsMarshal.SetCount(list29, num3); + CollectionsMarshal.AsSpan(list29)[0] = "Add Valentione's Day 2026 quest (The Icing on the Cake)"; + reference28 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list29); + ref ChangeEntry reference29 = ref span11[1]; + num3 = 2; List list30 = new List(num3); CollectionsMarshal.SetCount(list30, num3); - CollectionsMarshal.AsSpan(list30)[0] = "Add Heavensturn (2026) quests"; - reference29 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list30); - ref ChangeEntry reference30 = ref span14[1]; - num3 = 1; - List list31 = new List(num3); - CollectionsMarshal.SetCount(list31, num3); - CollectionsMarshal.AsSpan(list31)[0] = "Added missing quest sequences"; - reference30 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list31); - ref ChangeEntry reference31 = ref span14[2]; - num3 = 1; + Span span12 = CollectionsMarshal.AsSpan(list30); + span12[0] = "Updated Duty journal to include missing duty types"; + span12[1] = "Added various missing sequences to quests"; + reference29 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list30); + reference27 = new ChangelogEntry("7.4.11", releaseDate11, list28); + ref ChangelogEntry reference30 = ref span[11]; + DateOnly releaseDate12 = new DateOnly(2026, 1, 18); + num2 = 2; + List list31 = new List(num2); + CollectionsMarshal.SetCount(list31, num2); + Span span13 = CollectionsMarshal.AsSpan(list31); + ref ChangeEntry reference31 = ref span13[0]; + num3 = 5; List list32 = new List(num3); CollectionsMarshal.SetCount(list32, num3); - CollectionsMarshal.AsSpan(list32)[0] = "Fixed leveling mode not restarting properly"; - reference31 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list32); - reference28 = new ChangelogEntry("7.4.9", releaseDate11, list29); - ref ChangelogEntry reference32 = ref span[11]; - DateOnly releaseDate12 = new DateOnly(2025, 12, 29); - num2 = 1; - List list33 = new List(num2); - CollectionsMarshal.SetCount(list33, num2); - ref ChangeEntry reference33 = ref CollectionsMarshal.AsSpan(list33)[0]; - num3 = 2; - List list34 = new List(num3); - CollectionsMarshal.SetCount(list34, num3); - Span span15 = CollectionsMarshal.AsSpan(list34); - span15[0] = "Fixed infinite teleport loop when multiple quests compete for priority"; - span15[1] = "Fixed leveling mode enabling for quest duties"; - reference33 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list34); - reference32 = new ChangelogEntry("7.4.8", releaseDate12, list33); - ref ChangelogEntry reference34 = ref span[12]; - DateOnly releaseDate13 = new DateOnly(2025, 12, 28); - num2 = 4; - List list35 = new List(num2); - CollectionsMarshal.SetCount(list35, num2); - Span span16 = CollectionsMarshal.AsSpan(list35); - ref ChangeEntry reference35 = ref span16[0]; + Span span14 = CollectionsMarshal.AsSpan(list32); + span14[0] = "Added quest blacklisting"; + span14[1] = "Added MSQ Priority config"; + span14[2] = "Added Quest priority persistence config"; + span14[3] = "Added Duties tab to Journal"; + span14[4] = "Added GC shop handling and chocobo naming for chocobo quests"; + reference31 = new ChangeEntry(EChangeCategory.Added, "Major Features", list32); + ref ChangeEntry reference32 = ref span13[1]; + num3 = 5; + List list33 = new List(num3); + CollectionsMarshal.SetCount(list33, num3); + Span span15 = CollectionsMarshal.AsSpan(list33); + span15[0] = "Removed PandorasBox dependency and added QTE handling"; + span15[1] = "Removed CBT dependency and added Snipe handling"; + span15[2] = "Added drag reordering to Stop condition quests"; + span15[3] = "Ignore item level requirements if using Unsync config"; + span15[4] = "Setting a Stop quest to Off no longer removes it from the list"; + reference32 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list33); + reference30 = new ChangelogEntry("7.4.10", releaseDate12, list31); + ref ChangelogEntry reference33 = ref span[12]; + DateOnly releaseDate13 = new DateOnly(2025, 12, 31); + num2 = 3; + List list34 = new List(num2); + CollectionsMarshal.SetCount(list34, num2); + Span span16 = CollectionsMarshal.AsSpan(list34); + ref ChangeEntry reference34 = ref span16[0]; + num3 = 1; + List list35 = new List(num3); + CollectionsMarshal.SetCount(list35, num3); + CollectionsMarshal.AsSpan(list35)[0] = "Add Heavensturn (2026) quests"; + reference34 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list35); + ref ChangeEntry reference35 = ref span16[1]; num3 = 1; List list36 = new List(num3); CollectionsMarshal.SetCount(list36, num3); - CollectionsMarshal.AsSpan(list36)[0] = "Added leveling mode when underleveled for MSQ"; - reference35 = new ChangeEntry(EChangeCategory.Added, "Major Features", list36); - ref ChangeEntry reference36 = ref span16[1]; - num3 = 3; + CollectionsMarshal.AsSpan(list36)[0] = "Added missing quest sequences"; + reference35 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list36); + ref ChangeEntry reference36 = ref span16[2]; + num3 = 1; List list37 = new List(num3); CollectionsMarshal.SetCount(list37, num3); - Span span17 = CollectionsMarshal.AsSpan(list37); - span17[0] = "Added missing dungeons to Duties"; - span17[1] = "Added Normal Raids and Alliance Raids to duties tab"; - span17[2] = "Added Pause/Stop modes to stop conditions"; - reference36 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list37); - ref ChangeEntry reference37 = ref span16[2]; - num3 = 1; - List list38 = new List(num3); - CollectionsMarshal.SetCount(list38, num3); - CollectionsMarshal.AsSpan(list38)[0] = "Added leveling mode IPC: IsLevelingModeEnabled, SetLevelingModeEnabled, GetMsqLevelLockInfo, StartLevelingMode, StopLevelingMode"; - reference37 = new ChangeEntry(EChangeCategory.Added, "IPC Changes", list38); - ref ChangeEntry reference38 = ref span16[3]; - num3 = 1; + CollectionsMarshal.AsSpan(list37)[0] = "Fixed leveling mode not restarting properly"; + reference36 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list37); + reference33 = new ChangelogEntry("7.4.9", releaseDate13, list34); + ref ChangelogEntry reference37 = ref span[13]; + DateOnly releaseDate14 = new DateOnly(2025, 12, 29); + num2 = 1; + List list38 = new List(num2); + CollectionsMarshal.SetCount(list38, num2); + ref ChangeEntry reference38 = ref CollectionsMarshal.AsSpan(list38)[0]; + num3 = 2; List list39 = new List(num3); CollectionsMarshal.SetCount(list39, num3); - CollectionsMarshal.AsSpan(list39)[0] = "Fixed UI appearing in duties when debuff or interrupts occur"; + Span span17 = CollectionsMarshal.AsSpan(list39); + span17[0] = "Fixed infinite teleport loop when multiple quests compete for priority"; + span17[1] = "Fixed leveling mode enabling for quest duties"; reference38 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list39); - reference34 = new ChangelogEntry("7.4.7", releaseDate13, list35); - ref ChangelogEntry reference39 = ref span[13]; - DateOnly releaseDate14 = new DateOnly(2025, 12, 23); - num2 = 2; + reference37 = new ChangelogEntry("7.4.8", releaseDate14, list38); + ref ChangelogEntry reference39 = ref span[14]; + DateOnly releaseDate15 = new DateOnly(2025, 12, 28); + num2 = 4; List list40 = new List(num2); CollectionsMarshal.SetCount(list40, num2); Span span18 = CollectionsMarshal.AsSpan(list40); @@ -286,737 +285,771 @@ internal static class ChangelogData num3 = 1; List list41 = new List(num3); CollectionsMarshal.SetCount(list41, num3); - CollectionsMarshal.AsSpan(list41)[0] = "Added Cinema Mode to not skip cutscenes"; + CollectionsMarshal.AsSpan(list41)[0] = "Added leveling mode when underleveled for MSQ"; reference40 = new ChangeEntry(EChangeCategory.Added, "Major Features", list41); ref ChangeEntry reference41 = ref span18[1]; - num3 = 2; + num3 = 3; List list42 = new List(num3); CollectionsMarshal.SetCount(list42, num3); Span span19 = CollectionsMarshal.AsSpan(list42); - span19[0] = "Added handling for Unsync (Party) to Party Watchdog and configuration to disable if in party"; - span19[1] = "Stop conditions now act as a true stop"; + span19[0] = "Added missing dungeons to Duties"; + span19[1] = "Added Normal Raids and Alliance Raids to duties tab"; + span19[2] = "Added Pause/Stop modes to stop conditions"; reference41 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list42); - reference39 = new ChangelogEntry("7.4.6", releaseDate14, list40); - ref ChangelogEntry reference42 = ref span[14]; - DateOnly releaseDate15 = new DateOnly(2025, 12, 22); - num2 = 1; - List list43 = new List(num2); - CollectionsMarshal.SetCount(list43, num2); - ref ChangeEntry reference43 = ref CollectionsMarshal.AsSpan(list43)[0]; - num3 = 2; + ref ChangeEntry reference42 = ref span18[2]; + num3 = 1; + List list43 = new List(num3); + CollectionsMarshal.SetCount(list43, num3); + CollectionsMarshal.AsSpan(list43)[0] = "Added leveling mode IPC: IsLevelingModeEnabled, SetLevelingModeEnabled, GetMsqLevelLockInfo, StartLevelingMode, StopLevelingMode"; + reference42 = new ChangeEntry(EChangeCategory.Added, "IPC Changes", list43); + ref ChangeEntry reference43 = ref span18[3]; + num3 = 1; List list44 = new List(num3); CollectionsMarshal.SetCount(list44, num3); - Span span20 = CollectionsMarshal.AsSpan(list44); - span20[0] = "Dive adjustments"; - span20[1] = "Logging message adjustments"; - reference43 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list44); - reference42 = new ChangelogEntry("7.4.5", releaseDate15, list43); + CollectionsMarshal.AsSpan(list44)[0] = "Fixed UI appearing in duties when debuff or interrupts occur"; + reference43 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list44); + reference39 = new ChangelogEntry("7.4.7", releaseDate15, list40); ref ChangelogEntry reference44 = ref span[15]; - DateOnly releaseDate16 = new DateOnly(2025, 12, 21); + DateOnly releaseDate16 = new DateOnly(2025, 12, 23); num2 = 2; List list45 = new List(num2); CollectionsMarshal.SetCount(list45, num2); - Span span21 = CollectionsMarshal.AsSpan(list45); - ref ChangeEntry reference45 = ref span21[0]; + Span span20 = CollectionsMarshal.AsSpan(list45); + ref ChangeEntry reference45 = ref span20[0]; num3 = 1; List list46 = new List(num3); CollectionsMarshal.SetCount(list46, num3); - CollectionsMarshal.AsSpan(list46)[0] = "Changelog only shows once per update now"; - reference45 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list46); - ref ChangeEntry reference46 = ref span21[1]; - num3 = 1; + CollectionsMarshal.AsSpan(list46)[0] = "Added Cinema Mode to not skip cutscenes"; + reference45 = new ChangeEntry(EChangeCategory.Added, "Major Features", list46); + ref ChangeEntry reference46 = ref span20[1]; + num3 = 2; List list47 = new List(num3); CollectionsMarshal.SetCount(list47, num3); - CollectionsMarshal.AsSpan(list47)[0] = "Fixed gathering paths loading"; - reference46 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list47); - reference44 = new ChangelogEntry("7.4.4", releaseDate16, list45); + Span span21 = CollectionsMarshal.AsSpan(list47); + span21[0] = "Added handling for Unsync (Party) to Party Watchdog and configuration to disable if in party"; + span21[1] = "Stop conditions now act as a true stop"; + reference46 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list47); + reference44 = new ChangelogEntry("7.4.6", releaseDate16, list45); ref ChangelogEntry reference47 = ref span[16]; - DateOnly releaseDate17 = new DateOnly(2025, 12, 21); + DateOnly releaseDate17 = new DateOnly(2025, 12, 22); num2 = 1; List list48 = new List(num2); CollectionsMarshal.SetCount(list48, num2); ref ChangeEntry reference48 = ref CollectionsMarshal.AsSpan(list48)[0]; - num3 = 1; + num3 = 2; List list49 = new List(num3); CollectionsMarshal.SetCount(list49, num3); - CollectionsMarshal.AsSpan(list49)[0] = "Fixed changelog version checks"; - reference48 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list49); - reference47 = new ChangelogEntry("7.4.3", releaseDate17, list48); + Span span22 = CollectionsMarshal.AsSpan(list49); + span22[0] = "Dive adjustments"; + span22[1] = "Logging message adjustments"; + reference48 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list49); + reference47 = new ChangelogEntry("7.4.5", releaseDate17, list48); ref ChangelogEntry reference49 = ref span[17]; - DateOnly releaseDate18 = new DateOnly(2025, 12, 20); + DateOnly releaseDate18 = new DateOnly(2025, 12, 21); num2 = 2; List list50 = new List(num2); CollectionsMarshal.SetCount(list50, num2); - Span span22 = CollectionsMarshal.AsSpan(list50); - ref ChangeEntry reference50 = ref span22[0]; + Span span23 = CollectionsMarshal.AsSpan(list50); + ref ChangeEntry reference50 = ref span23[0]; num3 = 1; List list51 = new List(num3); CollectionsMarshal.SetCount(list51, num3); - CollectionsMarshal.AsSpan(list51)[0] = "Add 7.4 Starlight Celebration (2025) quest"; - reference50 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list51); - ref ChangeEntry reference51 = ref span22[1]; + CollectionsMarshal.AsSpan(list51)[0] = "Changelog only shows once per update now"; + reference50 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list51); + ref ChangeEntry reference51 = ref span23[1]; num3 = 1; List list52 = new List(num3); CollectionsMarshal.SetCount(list52, num3); - CollectionsMarshal.AsSpan(list52)[0] = "Fixed 7.4 MSQ"; + CollectionsMarshal.AsSpan(list52)[0] = "Fixed gathering paths loading"; reference51 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list52); - reference49 = new ChangelogEntry("7.4.2", releaseDate18, list50); + reference49 = new ChangelogEntry("7.4.4", releaseDate18, list50); ref ChangelogEntry reference52 = ref span[18]; - DateOnly releaseDate19 = new DateOnly(2025, 12, 19); + DateOnly releaseDate19 = new DateOnly(2025, 12, 21); num2 = 1; List list53 = new List(num2); CollectionsMarshal.SetCount(list53, num2); ref ChangeEntry reference53 = ref CollectionsMarshal.AsSpan(list53)[0]; - num3 = 2; + num3 = 1; List list54 = new List(num3); CollectionsMarshal.SetCount(list54, num3); - Span span23 = CollectionsMarshal.AsSpan(list54); - span23[0] = "Add 7.4 MSQ"; - span23[1] = "Add 7.4 Arcadion Raid quests"; - reference53 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list54); - reference52 = new ChangelogEntry("7.4.1", releaseDate19, list53); + CollectionsMarshal.AsSpan(list54)[0] = "Fixed changelog version checks"; + reference53 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list54); + reference52 = new ChangelogEntry("7.4.3", releaseDate19, list53); ref ChangelogEntry reference54 = ref span[19]; - DateOnly releaseDate20 = new DateOnly(2025, 12, 17); - num2 = 1; + DateOnly releaseDate20 = new DateOnly(2025, 12, 20); + num2 = 2; List list55 = new List(num2); CollectionsMarshal.SetCount(list55, num2); - CollectionsMarshal.AsSpan(list55)[0] = new ChangeEntry(EChangeCategory.Changed, "Api 14 update"); - reference54 = new ChangelogEntry("7.4.0", releaseDate20, list55); - ref ChangelogEntry reference55 = ref span[20]; - DateOnly releaseDate21 = new DateOnly(2025, 12, 6); - num2 = 2; - List list56 = new List(num2); - CollectionsMarshal.SetCount(list56, num2); - Span span24 = CollectionsMarshal.AsSpan(list56); - ref ChangeEntry reference56 = ref span24[0]; - num3 = 4; + Span span24 = CollectionsMarshal.AsSpan(list55); + ref ChangeEntry reference55 = ref span24[0]; + num3 = 1; + List list56 = new List(num3); + CollectionsMarshal.SetCount(list56, num3); + CollectionsMarshal.AsSpan(list56)[0] = "Add 7.4 Starlight Celebration (2025) quest"; + reference55 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list56); + ref ChangeEntry reference56 = ref span24[1]; + num3 = 1; List list57 = new List(num3); CollectionsMarshal.SetCount(list57, num3); - Span span25 = CollectionsMarshal.AsSpan(list57); - span25[0] = "Added reloading and rebuilding to movement system"; - span25[1] = "Improved interrupts and refresh states to allow continuation of questing"; - span25[2] = "Added player input detection to stop automation when manually moving character"; - span25[3] = "Added various missing quest sequences"; - reference56 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list57); - ref ChangeEntry reference57 = ref span24[1]; - num3 = 1; - List list58 = new List(num3); - CollectionsMarshal.SetCount(list58, num3); - CollectionsMarshal.AsSpan(list58)[0] = "Fixed reset task state to prevent stuck interactions after interruption"; - reference57 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list58); - reference55 = new ChangelogEntry("7.38.9", releaseDate21, list56); - ref ChangelogEntry reference58 = ref span[21]; - DateOnly releaseDate22 = new DateOnly(2025, 11, 29); - num2 = 2; - List list59 = new List(num2); - CollectionsMarshal.SetCount(list59, num2); - Span span26 = CollectionsMarshal.AsSpan(list59); - ref ChangeEntry reference59 = ref span26[0]; - num3 = 3; - List list60 = new List(num3); - CollectionsMarshal.SetCount(list60, num3); - Span span27 = CollectionsMarshal.AsSpan(list60); - span27[0] = "Movement update with automatic retrying if character can't reach target position"; - span27[1] = "Added Hunt mob data"; - span27[2] = "Refactored commands"; - reference59 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list60); - ref ChangeEntry reference60 = ref span26[1]; - num3 = 3; - List list61 = new List(num3); - CollectionsMarshal.SetCount(list61, num3); - Span span28 = CollectionsMarshal.AsSpan(list61); - span28[0] = "Fixed quest (Way of the Archer)"; - span28[1] = "Fixed quest (Spirithold Broken)"; - span28[2] = "Fixed quest (It's Probably Not Pirates)"; - reference60 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list61); - reference58 = new ChangelogEntry("7.38.8", releaseDate22, list59); - ref ChangelogEntry reference61 = ref span[22]; - DateOnly releaseDate23 = new DateOnly(2025, 11, 25); - num2 = 2; - List list62 = new List(num2); - CollectionsMarshal.SetCount(list62, num2); - Span span29 = CollectionsMarshal.AsSpan(list62); - ref ChangeEntry reference62 = ref span29[0]; + CollectionsMarshal.AsSpan(list57)[0] = "Fixed 7.4 MSQ"; + reference56 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list57); + reference54 = new ChangelogEntry("7.4.2", releaseDate20, list55); + ref ChangelogEntry reference57 = ref span[20]; + DateOnly releaseDate21 = new DateOnly(2025, 12, 19); + num2 = 1; + List list58 = new List(num2); + CollectionsMarshal.SetCount(list58, num2); + ref ChangeEntry reference58 = ref CollectionsMarshal.AsSpan(list58)[0]; num3 = 2; + List list59 = new List(num3); + CollectionsMarshal.SetCount(list59, num3); + Span span25 = CollectionsMarshal.AsSpan(list59); + span25[0] = "Add 7.4 MSQ"; + span25[1] = "Add 7.4 Arcadion Raid quests"; + reference58 = new ChangeEntry(EChangeCategory.QuestUpdates, "New Quest Paths", list59); + reference57 = new ChangelogEntry("7.4.1", releaseDate21, list58); + ref ChangelogEntry reference59 = ref span[21]; + DateOnly releaseDate22 = new DateOnly(2025, 12, 17); + num2 = 1; + List list60 = new List(num2); + CollectionsMarshal.SetCount(list60, num2); + CollectionsMarshal.AsSpan(list60)[0] = new ChangeEntry(EChangeCategory.Changed, "Api 14 update"); + reference59 = new ChangelogEntry("7.4.0", releaseDate22, list60); + ref ChangelogEntry reference60 = ref span[22]; + DateOnly releaseDate23 = new DateOnly(2025, 12, 6); + num2 = 2; + List list61 = new List(num2); + CollectionsMarshal.SetCount(list61, num2); + Span span26 = CollectionsMarshal.AsSpan(list61); + ref ChangeEntry reference61 = ref span26[0]; + num3 = 4; + List list62 = new List(num3); + CollectionsMarshal.SetCount(list62, num3); + Span span27 = CollectionsMarshal.AsSpan(list62); + span27[0] = "Added reloading and rebuilding to movement system"; + span27[1] = "Improved interrupts and refresh states to allow continuation of questing"; + span27[2] = "Added player input detection to stop automation when manually moving character"; + span27[3] = "Added various missing quest sequences"; + reference61 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list62); + ref ChangeEntry reference62 = ref span26[1]; + num3 = 1; List list63 = new List(num3); CollectionsMarshal.SetCount(list63, num3); - Span span30 = CollectionsMarshal.AsSpan(list63); - span30[0] = "Added individual sequence stop condition for each quest"; - span30[1] = "Added Trials to Duties tab in config"; - reference62 = new ChangeEntry(EChangeCategory.Added, "Major features", list63); - ref ChangeEntry reference63 = ref span29[1]; - num3 = 1; - List list64 = new List(num3); - CollectionsMarshal.SetCount(list64, num3); - CollectionsMarshal.AsSpan(list64)[0] = "Added IPC for stop conditions: GetQuestSequenceStopCondition, SetQuestSequenceStopCondition, RemoveQuestSequenceStopCondition, GetAllQuestSequenceStopConditions"; - reference63 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list64); - reference61 = new ChangelogEntry("7.38.7", releaseDate23, list62); - ref ChangelogEntry reference64 = ref span[23]; - DateOnly releaseDate24 = new DateOnly(2025, 11, 25); - num2 = 3; - List list65 = new List(num2); - CollectionsMarshal.SetCount(list65, num2); - Span span31 = CollectionsMarshal.AsSpan(list65); - ref ChangeEntry reference65 = ref span31[0]; - num3 = 2; + CollectionsMarshal.AsSpan(list63)[0] = "Fixed reset task state to prevent stuck interactions after interruption"; + reference62 = new ChangeEntry(EChangeCategory.Fixed, "Fixes", list63); + reference60 = new ChangelogEntry("7.38.9", releaseDate23, list61); + ref ChangelogEntry reference63 = ref span[23]; + DateOnly releaseDate24 = new DateOnly(2025, 11, 29); + num2 = 2; + List list64 = new List(num2); + CollectionsMarshal.SetCount(list64, num2); + Span span28 = CollectionsMarshal.AsSpan(list64); + ref ChangeEntry reference64 = ref span28[0]; + num3 = 3; + List list65 = new List(num3); + CollectionsMarshal.SetCount(list65, num3); + Span span29 = CollectionsMarshal.AsSpan(list65); + span29[0] = "Movement update with automatic retrying if character can't reach target position"; + span29[1] = "Added Hunt mob data"; + span29[2] = "Refactored commands"; + reference64 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list65); + ref ChangeEntry reference65 = ref span28[1]; + num3 = 3; List list66 = new List(num3); CollectionsMarshal.SetCount(list66, num3); - Span span32 = CollectionsMarshal.AsSpan(list66); - span32[0] = "Updated Allied Society journal text"; - span32[1] = "Improved Allied Society rank handling"; - reference65 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list66); - ref ChangeEntry reference66 = ref span31[1]; - num3 = 1; - List list67 = new List(num3); - CollectionsMarshal.SetCount(list67, num3); - CollectionsMarshal.AsSpan(list67)[0] = "Added IPC for Allied Society: AddAlliedSocietyOptimalQuests, GetAlliedSocietyOptimalQuests"; - reference66 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list67); - ref ChangeEntry reference67 = ref span31[2]; - num3 = 1; + Span span30 = CollectionsMarshal.AsSpan(list66); + span30[0] = "Fixed quest (Way of the Archer)"; + span30[1] = "Fixed quest (Spirithold Broken)"; + span30[2] = "Fixed quest (It's Probably Not Pirates)"; + reference65 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list66); + reference63 = new ChangelogEntry("7.38.8", releaseDate24, list64); + ref ChangelogEntry reference66 = ref span[24]; + DateOnly releaseDate25 = new DateOnly(2025, 11, 25); + num2 = 2; + List list67 = new List(num2); + CollectionsMarshal.SetCount(list67, num2); + Span span31 = CollectionsMarshal.AsSpan(list67); + ref ChangeEntry reference67 = ref span31[0]; + num3 = 2; List list68 = new List(num3); CollectionsMarshal.SetCount(list68, num3); - CollectionsMarshal.AsSpan(list68)[0] = "Fixed quest (We Come in Peace)"; - reference67 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list68); - reference64 = new ChangelogEntry("7.38.6", releaseDate24, list65); - ref ChangelogEntry reference68 = ref span[24]; - DateOnly releaseDate25 = new DateOnly(2025, 11, 24); - num2 = 2; - List list69 = new List(num2); - CollectionsMarshal.SetCount(list69, num2); - Span span33 = CollectionsMarshal.AsSpan(list69); - ref ChangeEntry reference69 = ref span33[0]; - num3 = 1; - List list70 = new List(num3); - CollectionsMarshal.SetCount(list70, num3); - CollectionsMarshal.AsSpan(list70)[0] = "Added Allied Society daily allowance tracker with bulk quest adding buttons"; - reference69 = new ChangeEntry(EChangeCategory.Added, "Major features", list70); - ref ChangeEntry reference70 = ref span33[1]; + Span span32 = CollectionsMarshal.AsSpan(list68); + span32[0] = "Added individual sequence stop condition for each quest"; + span32[1] = "Added Trials to Duties tab in config"; + reference67 = new ChangeEntry(EChangeCategory.Added, "Major features", list68); + ref ChangeEntry reference68 = ref span31[1]; num3 = 1; + List list69 = new List(num3); + CollectionsMarshal.SetCount(list69, num3); + CollectionsMarshal.AsSpan(list69)[0] = "Added IPC for stop conditions: GetQuestSequenceStopCondition, SetQuestSequenceStopCondition, RemoveQuestSequenceStopCondition, GetAllQuestSequenceStopConditions"; + reference68 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list69); + reference66 = new ChangelogEntry("7.38.7", releaseDate25, list67); + ref ChangelogEntry reference69 = ref span[25]; + DateOnly releaseDate26 = new DateOnly(2025, 11, 25); + num2 = 3; + List list70 = new List(num2); + CollectionsMarshal.SetCount(list70, num2); + Span span33 = CollectionsMarshal.AsSpan(list70); + ref ChangeEntry reference70 = ref span33[0]; + num3 = 2; List list71 = new List(num3); CollectionsMarshal.SetCount(list71, num3); - CollectionsMarshal.AsSpan(list71)[0] = "Added IPC for Allied Society: GetRemainingAllowances, GetTimeUntilReset, GetAvailableQuestIds, GetAllAvailableQuestCounts, IsMaxRank, GetCurrentRank, GetSocietiesWithAvailableQuests"; - reference70 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list71); - reference68 = new ChangelogEntry("7.38.5", releaseDate25, list69); - ref ChangelogEntry reference71 = ref span[25]; - DateOnly releaseDate26 = new DateOnly(2025, 11, 23); - num2 = 2; - List list72 = new List(num2); - CollectionsMarshal.SetCount(list72, num2); - Span span34 = CollectionsMarshal.AsSpan(list72); - ref ChangeEntry reference72 = ref span34[0]; + Span span34 = CollectionsMarshal.AsSpan(list71); + span34[0] = "Updated Allied Society journal text"; + span34[1] = "Improved Allied Society rank handling"; + reference70 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list71); + ref ChangeEntry reference71 = ref span33[1]; + num3 = 1; + List list72 = new List(num3); + CollectionsMarshal.SetCount(list72, num3); + CollectionsMarshal.AsSpan(list72)[0] = "Added IPC for Allied Society: AddAlliedSocietyOptimalQuests, GetAlliedSocietyOptimalQuests"; + reference71 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list72); + ref ChangeEntry reference72 = ref span33[2]; num3 = 1; List list73 = new List(num3); CollectionsMarshal.SetCount(list73, num3); - CollectionsMarshal.AsSpan(list73)[0] = "Explicitly declare support for BMR singleplayer duty (The Rematch)"; - reference72 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list73); - ref ChangeEntry reference73 = ref span34[1]; - num3 = 8; - List list74 = new List(num3); - CollectionsMarshal.SetCount(list74, num3); - Span span35 = CollectionsMarshal.AsSpan(list74); - span35[0] = "Fixed quest (Microbrewing) to not get stuck near ramp"; - span35[1] = "Fixed quest (The Illuminated Land) where pathing would kill the player due to fall damage"; - span35[2] = "Fixed quest (It's Probably Not Pirates) improper pathing and removed unneeded step"; - span35[3] = "Fixed quest (The Black Wolf's Ultimatum) not exiting landing area"; - span35[4] = "Fixed quest (Magiteknical Failure) from not interacting with NPC due to being mounted"; - span35[5] = "Fixed quest (We Come in Peace) shortcut navigation"; - span35[6] = "Fixed quest (Poisoned Hearts) where incorrect pathing caused the player to die"; - span35[7] = "Fixed quests (Savage Snares) and (An Apple a Day) not detecting kills"; - reference73 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list74); - reference71 = new ChangelogEntry("7.38.4", releaseDate26, list72); - ref ChangelogEntry reference74 = ref span[26]; - DateOnly releaseDate27 = new DateOnly(2025, 11, 23); - num2 = 3; - List list75 = new List(num2); - CollectionsMarshal.SetCount(list75, num2); - Span span36 = CollectionsMarshal.AsSpan(list75); - ref ChangeEntry reference75 = ref span36[0]; - num3 = 2; + CollectionsMarshal.AsSpan(list73)[0] = "Fixed quest (We Come in Peace)"; + reference72 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list73); + reference69 = new ChangelogEntry("7.38.6", releaseDate26, list70); + ref ChangelogEntry reference73 = ref span[26]; + DateOnly releaseDate27 = new DateOnly(2025, 11, 24); + num2 = 2; + List list74 = new List(num2); + CollectionsMarshal.SetCount(list74, num2); + Span span35 = CollectionsMarshal.AsSpan(list74); + ref ChangeEntry reference74 = ref span35[0]; + num3 = 1; + List list75 = new List(num3); + CollectionsMarshal.SetCount(list75, num3); + CollectionsMarshal.AsSpan(list75)[0] = "Added Allied Society daily allowance tracker with bulk quest adding buttons"; + reference74 = new ChangeEntry(EChangeCategory.Added, "Major features", list75); + ref ChangeEntry reference75 = ref span35[1]; + num3 = 1; List list76 = new List(num3); CollectionsMarshal.SetCount(list76, num3); - Span span37 = CollectionsMarshal.AsSpan(list76); - span37[0] = "Added RequireHq to crafting InteractionType"; - span37[1] = "Mark GC quests as Locked if rank not achieved"; - reference75 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list76); - ref ChangeEntry reference76 = ref span36[1]; - num3 = 2; - List list77 = new List(num3); - CollectionsMarshal.SetCount(list77, num3); - Span span38 = CollectionsMarshal.AsSpan(list77); - span38[0] = "Added IPC for stop conditions: GetStopConditionsEnabled, SetStopConditionsEnabled, GetStopQuestList, AddStopQuest, RemoveStopQuest, ClearStopQuests, GetLevelStopCondition, SetLevelStopCondition, GetSequenceStopCondition, SetSequenceStopCondition"; - span38[1] = "Added IPC for priority quests: GetPriorityQuests, RemovePriorityQuest, ReorderPriorityQuest, GetAvailablePresets, GetPresetQuests, AddPresetToPriority, IsPresetAvailable, IsQuestInPriority, GetQuestPriorityIndex, HasAvailablePriorityQuests"; - reference76 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list77); - ref ChangeEntry reference77 = ref span36[2]; - num3 = 3; + CollectionsMarshal.AsSpan(list76)[0] = "Added IPC for Allied Society: GetRemainingAllowances, GetTimeUntilReset, GetAvailableQuestIds, GetAllAvailableQuestCounts, IsMaxRank, GetCurrentRank, GetSocietiesWithAvailableQuests"; + reference75 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list76); + reference73 = new ChangelogEntry("7.38.5", releaseDate27, list74); + ref ChangelogEntry reference76 = ref span[27]; + DateOnly releaseDate28 = new DateOnly(2025, 11, 23); + num2 = 2; + List list77 = new List(num2); + CollectionsMarshal.SetCount(list77, num2); + Span span36 = CollectionsMarshal.AsSpan(list77); + ref ChangeEntry reference77 = ref span36[0]; + num3 = 1; List list78 = new List(num3); CollectionsMarshal.SetCount(list78, num3); - Span span39 = CollectionsMarshal.AsSpan(list78); - span39[0] = "Fixed line breaks not working in dialog strings"; - span39[1] = "Fixed quest (Labor of Love)"; - span39[2] = "Fixed quest (Sea of Sorrow)"; - reference77 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list78); - reference74 = new ChangelogEntry("7.38.3", releaseDate27, list75); - ref ChangelogEntry reference78 = ref span[27]; - DateOnly releaseDate28 = new DateOnly(2025, 11, 18); + CollectionsMarshal.AsSpan(list78)[0] = "Explicitly declare support for BMR singleplayer duty (The Rematch)"; + reference77 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list78); + ref ChangeEntry reference78 = ref span36[1]; + num3 = 8; + List list79 = new List(num3); + CollectionsMarshal.SetCount(list79, num3); + Span span37 = CollectionsMarshal.AsSpan(list79); + span37[0] = "Fixed quest (Microbrewing) to not get stuck near ramp"; + span37[1] = "Fixed quest (The Illuminated Land) where pathing would kill the player due to fall damage"; + span37[2] = "Fixed quest (It's Probably Not Pirates) improper pathing and removed unneeded step"; + span37[3] = "Fixed quest (The Black Wolf's Ultimatum) not exiting landing area"; + span37[4] = "Fixed quest (Magiteknical Failure) from not interacting with NPC due to being mounted"; + span37[5] = "Fixed quest (We Come in Peace) shortcut navigation"; + span37[6] = "Fixed quest (Poisoned Hearts) where incorrect pathing caused the player to die"; + span37[7] = "Fixed quests (Savage Snares) and (An Apple a Day) not detecting kills"; + reference78 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list79); + reference76 = new ChangelogEntry("7.38.4", releaseDate28, list77); + ref ChangelogEntry reference79 = ref span[28]; + DateOnly releaseDate29 = new DateOnly(2025, 11, 23); num2 = 3; - List list79 = new List(num2); - CollectionsMarshal.SetCount(list79, num2); - Span span40 = CollectionsMarshal.AsSpan(list79); - ref ChangeEntry reference79 = ref span40[0]; + List list80 = new List(num2); + CollectionsMarshal.SetCount(list80, num2); + Span span38 = CollectionsMarshal.AsSpan(list80); + ref ChangeEntry reference80 = ref span38[0]; num3 = 2; - List list80 = new List(num3); - CollectionsMarshal.SetCount(list80, num3); - Span span41 = CollectionsMarshal.AsSpan(list80); - span41[0] = "Auto Duty unsync options for each duty (Duty Support, Unsync Solo, Unsync Party)"; - span41[1] = "Added Auto Duty unsync options to quest schema and updated quests using old unsync method"; - reference79 = new ChangeEntry(EChangeCategory.Added, "Major features", list80); - ref ChangeEntry reference80 = ref span40[1]; - num3 = 3; List list81 = new List(num3); CollectionsMarshal.SetCount(list81, num3); - Span span42 = CollectionsMarshal.AsSpan(list81); - span42[0] = "Added IPC for duty sync handling: GetDefaultDutyMode, SetDefaultDutyMode"; - span42[1] = "Added IPC for duty mode overrides: GetDutyModeOverride, SetDutyModeOverride"; - span42[2] = "Added IPC for clearing overrides: ClearDutyModeOverride, ClearAllDutyModeOverrides"; - reference80 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list81); - span40[2] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest (Constant Cravings)"); - reference78 = new ChangelogEntry("7.38.2", releaseDate28, list79); - ref ChangelogEntry reference81 = ref span[28]; - DateOnly releaseDate29 = new DateOnly(2025, 11, 18); - num2 = 3; - List list82 = new List(num2); - CollectionsMarshal.SetCount(list82, num2); - Span span43 = CollectionsMarshal.AsSpan(list82); - ref ChangeEntry reference82 = ref span43[0]; - num3 = 1; + Span span39 = CollectionsMarshal.AsSpan(list81); + span39[0] = "Added RequireHq to crafting InteractionType"; + span39[1] = "Mark GC quests as Locked if rank not achieved"; + reference80 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list81); + ref ChangeEntry reference81 = ref span38[1]; + num3 = 2; + List list82 = new List(num3); + CollectionsMarshal.SetCount(list82, num3); + Span span40 = CollectionsMarshal.AsSpan(list82); + span40[0] = "Added IPC for stop conditions: GetStopConditionsEnabled, SetStopConditionsEnabled, GetStopQuestList, AddStopQuest, RemoveStopQuest, ClearStopQuests, GetLevelStopCondition, SetLevelStopCondition, GetSequenceStopCondition, SetSequenceStopCondition"; + span40[1] = "Added IPC for priority quests: GetPriorityQuests, RemovePriorityQuest, ReorderPriorityQuest, GetAvailablePresets, GetPresetQuests, AddPresetToPriority, IsPresetAvailable, IsQuestInPriority, GetQuestPriorityIndex, HasAvailablePriorityQuests"; + reference81 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list82); + ref ChangeEntry reference82 = ref span38[2]; + num3 = 3; List list83 = new List(num3); CollectionsMarshal.SetCount(list83, num3); - CollectionsMarshal.AsSpan(list83)[0] = "Added new fields to quest schema"; - reference82 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list83); - ref ChangeEntry reference83 = ref span43[1]; - num3 = 3; - List list84 = new List(num3); - CollectionsMarshal.SetCount(list84, num3); - Span span44 = CollectionsMarshal.AsSpan(list84); - span44[0] = "A Faerie Tale Come True"; - span44[1] = "Constant Cravings"; - span44[2] = "A Bridge Too Full"; - reference83 = new ChangeEntry(EChangeCategory.QuestUpdates, "Added new quest paths", list84); - ref ChangeEntry reference84 = ref span43[2]; - num3 = 3; + Span span41 = CollectionsMarshal.AsSpan(list83); + span41[0] = "Fixed line breaks not working in dialog strings"; + span41[1] = "Fixed quest (Labor of Love)"; + span41[2] = "Fixed quest (Sea of Sorrow)"; + reference82 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list83); + reference79 = new ChangelogEntry("7.38.3", releaseDate29, list80); + ref ChangelogEntry reference83 = ref span[29]; + DateOnly releaseDate30 = new DateOnly(2025, 11, 18); + num2 = 3; + List list84 = new List(num2); + CollectionsMarshal.SetCount(list84, num2); + Span span42 = CollectionsMarshal.AsSpan(list84); + ref ChangeEntry reference84 = ref span42[0]; + num3 = 2; List list85 = new List(num3); CollectionsMarshal.SetCount(list85, num3); - Span span45 = CollectionsMarshal.AsSpan(list85); - span45[0] = "Fixed various quest schemas"; - span45[1] = "Fixed changelog bullet point encoding"; - span45[2] = "Fixed item use to wait until item is used before next action"; - reference84 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list85); - reference81 = new ChangelogEntry("7.38.1", releaseDate29, list82); - ref ChangelogEntry reference85 = ref span[29]; - DateOnly releaseDate30 = new DateOnly(2025, 11, 17); - num2 = 5; - List list86 = new List(num2); - CollectionsMarshal.SetCount(list86, num2); - Span span46 = CollectionsMarshal.AsSpan(list86); - ref ChangeEntry reference86 = ref span46[0]; - num3 = 2; - List list87 = new List(num3); - CollectionsMarshal.SetCount(list87, num3); - Span span47 = CollectionsMarshal.AsSpan(list87); - span47[0] = "Quest sequence window to show expected sequences in each quest (with quest searching)"; - span47[1] = "Changelog"; - reference86 = new ChangeEntry(EChangeCategory.Added, "Major features", list87); - ref ChangeEntry reference87 = ref span46[1]; - num3 = 2; + Span span43 = CollectionsMarshal.AsSpan(list85); + span43[0] = "Auto Duty unsync options for each duty (Duty Support, Unsync Solo, Unsync Party)"; + span43[1] = "Added Auto Duty unsync options to quest schema and updated quests using old unsync method"; + reference84 = new ChangeEntry(EChangeCategory.Added, "Major features", list85); + ref ChangeEntry reference85 = ref span42[1]; + num3 = 3; + List list86 = new List(num3); + CollectionsMarshal.SetCount(list86, num3); + Span span44 = CollectionsMarshal.AsSpan(list86); + span44[0] = "Added IPC for duty sync handling: GetDefaultDutyMode, SetDefaultDutyMode"; + span44[1] = "Added IPC for duty mode overrides: GetDutyModeOverride, SetDutyModeOverride"; + span44[2] = "Added IPC for clearing overrides: ClearDutyModeOverride, ClearAllDutyModeOverrides"; + reference85 = new ChangeEntry(EChangeCategory.Added, "IPC changes", list86); + span42[2] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest (Constant Cravings)"); + reference83 = new ChangelogEntry("7.38.2", releaseDate30, list84); + ref ChangelogEntry reference86 = ref span[30]; + DateOnly releaseDate31 = new DateOnly(2025, 11, 18); + num2 = 3; + List list87 = new List(num2); + CollectionsMarshal.SetCount(list87, num2); + Span span45 = CollectionsMarshal.AsSpan(list87); + ref ChangeEntry reference87 = ref span45[0]; + num3 = 1; List list88 = new List(num3); CollectionsMarshal.SetCount(list88, num3); - Span span48 = CollectionsMarshal.AsSpan(list88); - span48[0] = "Updated quest schemas"; - span48[1] = "Added search bar to preferred mounts and capitalization to mirror game mount names"; + CollectionsMarshal.AsSpan(list88)[0] = "Added new fields to quest schema"; reference87 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list88); - ref ChangeEntry reference88 = ref span46[2]; + ref ChangeEntry reference88 = ref span45[1]; num3 = 3; List list89 = new List(num3); CollectionsMarshal.SetCount(list89, num3); - Span span49 = CollectionsMarshal.AsSpan(list89); - span49[0] = "Renamed IsQuestCompleted → IsQuestComplete"; - span49[1] = "Renamed IsQuestAvailable → IsReadyToAcceptQuest"; - span49[2] = "Added GetCurrentTask IPC"; - reference88 = new ChangeEntry(EChangeCategory.Changed, "IPC changes", list89); - span46[3] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added all Hildibrand quests"); - span46[4] = new ChangeEntry(EChangeCategory.Fixed, "Fixed credits/cutscenes playback"); - reference85 = new ChangelogEntry("7.38.0", releaseDate30, list86); - ref ChangelogEntry reference89 = ref span[30]; - DateOnly releaseDate31 = new DateOnly(2025, 11, 8); - num2 = 1; - List list90 = new List(num2); - CollectionsMarshal.SetCount(list90, num2); - CollectionsMarshal.AsSpan(list90)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Fall Guys quest (Just Crowning Around)"); - reference89 = new ChangelogEntry("6.38", releaseDate31, list90); + Span span46 = CollectionsMarshal.AsSpan(list89); + span46[0] = "A Faerie Tale Come True"; + span46[1] = "Constant Cravings"; + span46[2] = "A Bridge Too Full"; + reference88 = new ChangeEntry(EChangeCategory.QuestUpdates, "Added new quest paths", list89); + ref ChangeEntry reference89 = ref span45[2]; + num3 = 3; + List list90 = new List(num3); + CollectionsMarshal.SetCount(list90, num3); + Span span47 = CollectionsMarshal.AsSpan(list90); + span47[0] = "Fixed various quest schemas"; + span47[1] = "Fixed changelog bullet point encoding"; + span47[2] = "Fixed item use to wait until item is used before next action"; + reference89 = new ChangeEntry(EChangeCategory.Fixed, "Bug fixes", list90); + reference86 = new ChangelogEntry("7.38.1", releaseDate31, list87); ref ChangelogEntry reference90 = ref span[31]; - DateOnly releaseDate32 = new DateOnly(2025, 11, 8); - num2 = 1; + DateOnly releaseDate32 = new DateOnly(2025, 11, 17); + num2 = 5; List list91 = new List(num2); CollectionsMarshal.SetCount(list91, num2); - CollectionsMarshal.AsSpan(list91)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Cosmic Exploration and various unlock quests"); - reference90 = new ChangelogEntry("6.37", releaseDate32, list91); - ref ChangelogEntry reference91 = ref span[32]; - DateOnly releaseDate33 = new DateOnly(2025, 11, 2); - num2 = 1; - List list92 = new List(num2); - CollectionsMarshal.SetCount(list92, num2); - CollectionsMarshal.AsSpan(list92)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy Rank 6 quest (With High Spirits)"); - reference91 = new ChangelogEntry("6.36", releaseDate33, list92); - ref ChangelogEntry reference92 = ref span[33]; - DateOnly releaseDate34 = new DateOnly(2025, 10, 28); - num2 = 1; - List list93 = new List(num2); - CollectionsMarshal.SetCount(list93, num2); - CollectionsMarshal.AsSpan(list93)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed level 3 MSQ handling if character started on non-XP buff world"); - reference92 = new ChangelogEntry("6.35", releaseDate34, list93); - ref ChangelogEntry reference93 = ref span[34]; - DateOnly releaseDate35 = new DateOnly(2025, 10, 23); - num2 = 2; - List list94 = new List(num2); - CollectionsMarshal.SetCount(list94, num2); - Span span50 = CollectionsMarshal.AsSpan(list94); - span50[0] = new ChangeEntry(EChangeCategory.Added, "Added clear priority quests on logout and on completion config settings"); - span50[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed priority quest importing to respect import order"); - reference93 = new ChangelogEntry("6.34", releaseDate35, list94); - ref ChangelogEntry reference94 = ref span[35]; - DateOnly releaseDate36 = new DateOnly(2025, 10, 23); + Span span48 = CollectionsMarshal.AsSpan(list91); + ref ChangeEntry reference91 = ref span48[0]; + num3 = 2; + List list92 = new List(num3); + CollectionsMarshal.SetCount(list92, num3); + Span span49 = CollectionsMarshal.AsSpan(list92); + span49[0] = "Quest sequence window to show expected sequences in each quest (with quest searching)"; + span49[1] = "Changelog"; + reference91 = new ChangeEntry(EChangeCategory.Added, "Major features", list92); + ref ChangeEntry reference92 = ref span48[1]; + num3 = 2; + List list93 = new List(num3); + CollectionsMarshal.SetCount(list93, num3); + Span span50 = CollectionsMarshal.AsSpan(list93); + span50[0] = "Updated quest schemas"; + span50[1] = "Added search bar to preferred mounts and capitalization to mirror game mount names"; + reference92 = new ChangeEntry(EChangeCategory.Changed, "Improvements", list93); + ref ChangeEntry reference93 = ref span48[2]; + num3 = 3; + List list94 = new List(num3); + CollectionsMarshal.SetCount(list94, num3); + Span span51 = CollectionsMarshal.AsSpan(list94); + span51[0] = "Renamed IsQuestCompleted → IsQuestComplete"; + span51[1] = "Renamed IsQuestAvailable → IsReadyToAcceptQuest"; + span51[2] = "Added GetCurrentTask IPC"; + reference93 = new ChangeEntry(EChangeCategory.Changed, "IPC changes", list94); + span48[3] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added all Hildibrand quests"); + span48[4] = new ChangeEntry(EChangeCategory.Fixed, "Fixed credits/cutscenes playback"); + reference90 = new ChangelogEntry("7.38.0", releaseDate32, list91); + ref ChangelogEntry reference94 = ref span[32]; + DateOnly releaseDate33 = new DateOnly(2025, 11, 8); num2 = 1; List list95 = new List(num2); CollectionsMarshal.SetCount(list95, num2); - CollectionsMarshal.AsSpan(list95)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed RSR combat module"); - reference94 = new ChangelogEntry("6.33", releaseDate36, list95); - ref ChangelogEntry reference95 = ref span[36]; - DateOnly releaseDate37 = new DateOnly(2025, 10, 23); + CollectionsMarshal.AsSpan(list95)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Fall Guys quest (Just Crowning Around)"); + reference94 = new ChangelogEntry("6.38", releaseDate33, list95); + ref ChangelogEntry reference95 = ref span[33]; + DateOnly releaseDate34 = new DateOnly(2025, 11, 8); num2 = 1; List list96 = new List(num2); CollectionsMarshal.SetCount(list96, num2); - CollectionsMarshal.AsSpan(list96)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy Rank 5 quest (Forged in Corn)"); - reference95 = new ChangelogEntry("6.32", releaseDate37, list96); - ref ChangelogEntry reference96 = ref span[37]; - DateOnly releaseDate38 = new DateOnly(2025, 10, 21); + CollectionsMarshal.AsSpan(list96)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Cosmic Exploration and various unlock quests"); + reference95 = new ChangelogEntry("6.37", releaseDate34, list96); + ref ChangelogEntry reference96 = ref span[34]; + DateOnly releaseDate35 = new DateOnly(2025, 11, 2); num2 = 1; List list97 = new List(num2); CollectionsMarshal.SetCount(list97, num2); - CollectionsMarshal.AsSpan(list97)[0] = new ChangeEntry(EChangeCategory.Changed, "Added checks for moogle and allied society quests when using add all available quests"); - reference96 = new ChangelogEntry("6.31", releaseDate38, list97); - ref ChangelogEntry reference97 = ref span[38]; - DateOnly releaseDate39 = new DateOnly(2025, 10, 21); + CollectionsMarshal.AsSpan(list97)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy Rank 6 quest (With High Spirits)"); + reference96 = new ChangelogEntry("6.36", releaseDate35, list97); + ref ChangelogEntry reference97 = ref span[35]; + DateOnly releaseDate36 = new DateOnly(2025, 10, 28); num2 = 1; List list98 = new List(num2); CollectionsMarshal.SetCount(list98, num2); - CollectionsMarshal.AsSpan(list98)[0] = new ChangeEntry(EChangeCategory.Added, "Added button to journal that allows adding all available quests to priority"); - reference97 = new ChangelogEntry("6.30", releaseDate39, list98); - ref ChangelogEntry reference98 = ref span[39]; - DateOnly releaseDate40 = new DateOnly(2025, 10, 20); + CollectionsMarshal.AsSpan(list98)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed level 3 MSQ handling if character started on non-XP buff world"); + reference97 = new ChangelogEntry("6.35", releaseDate36, list98); + ref ChangelogEntry reference98 = ref span[36]; + DateOnly releaseDate37 = new DateOnly(2025, 10, 23); num2 = 2; List list99 = new List(num2); CollectionsMarshal.SetCount(list99, num2); - Span span51 = CollectionsMarshal.AsSpan(list99); - ref ChangeEntry reference99 = ref span51[0]; - num3 = 2; - List list100 = new List(num3); - CollectionsMarshal.SetCount(list100, num3); - Span span52 = CollectionsMarshal.AsSpan(list100); - span52[0] = "Added item count to combat handling rework"; - span52[1] = "Updated Pandora conflicting features"; - reference99 = new ChangeEntry(EChangeCategory.Changed, "Combat handling improvements", list100); - span51[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest to purchase Gysahl Greens if not in inventory"); - reference98 = new ChangelogEntry("6.29", releaseDate40, list99); - ref ChangelogEntry reference100 = ref span[40]; - DateOnly releaseDate41 = new DateOnly(2025, 10, 19); + Span span52 = CollectionsMarshal.AsSpan(list99); + span52[0] = new ChangeEntry(EChangeCategory.Added, "Added clear priority quests on logout and on completion config settings"); + span52[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed priority quest importing to respect import order"); + reference98 = new ChangelogEntry("6.34", releaseDate37, list99); + ref ChangelogEntry reference99 = ref span[37]; + DateOnly releaseDate38 = new DateOnly(2025, 10, 23); + num2 = 1; + List list100 = new List(num2); + CollectionsMarshal.SetCount(list100, num2); + CollectionsMarshal.AsSpan(list100)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed RSR combat module"); + reference99 = new ChangelogEntry("6.33", releaseDate38, list100); + ref ChangelogEntry reference100 = ref span[38]; + DateOnly releaseDate39 = new DateOnly(2025, 10, 23); num2 = 1; List list101 = new List(num2); CollectionsMarshal.SetCount(list101, num2); - CollectionsMarshal.AsSpan(list101)[0] = new ChangeEntry(EChangeCategory.Changed, "Reworked kill count combat handling - combat and enemy kills are now processed instantly"); - reference100 = new ChangelogEntry("6.28", releaseDate41, list101); - ref ChangelogEntry reference101 = ref span[41]; - DateOnly releaseDate42 = new DateOnly(2025, 10, 18); - num2 = 2; + CollectionsMarshal.AsSpan(list101)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy Rank 5 quest (Forged in Corn)"); + reference100 = new ChangelogEntry("6.32", releaseDate39, list101); + ref ChangelogEntry reference101 = ref span[39]; + DateOnly releaseDate40 = new DateOnly(2025, 10, 21); + num2 = 1; List list102 = new List(num2); CollectionsMarshal.SetCount(list102, num2); - Span span53 = CollectionsMarshal.AsSpan(list102); - span53[0] = new ChangeEntry(EChangeCategory.Changed, "Improved Aether Current checking logic"); - span53[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Chocobo Taxi Stand CheckSkip error and Patch 7.3 Fantasia unlock quest date/time"); - reference101 = new ChangelogEntry("6.27", releaseDate42, list102); - ref ChangelogEntry reference102 = ref span[42]; - DateOnly releaseDate43 = new DateOnly(2025, 10, 18); + CollectionsMarshal.AsSpan(list102)[0] = new ChangeEntry(EChangeCategory.Changed, "Added checks for moogle and allied society quests when using add all available quests"); + reference101 = new ChangelogEntry("6.31", releaseDate40, list102); + ref ChangelogEntry reference102 = ref span[40]; + DateOnly releaseDate41 = new DateOnly(2025, 10, 21); num2 = 1; List list103 = new List(num2); CollectionsMarshal.SetCount(list103, num2); - CollectionsMarshal.AsSpan(list103)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 4 quests"); - reference102 = new ChangelogEntry("6.26", releaseDate43, list103); - ref ChangelogEntry reference103 = ref span[43]; - DateOnly releaseDate44 = new DateOnly(2025, 10, 17); - num2 = 1; + CollectionsMarshal.AsSpan(list103)[0] = new ChangeEntry(EChangeCategory.Added, "Added button to journal that allows adding all available quests to priority"); + reference102 = new ChangelogEntry("6.30", releaseDate41, list103); + ref ChangelogEntry reference103 = ref span[41]; + DateOnly releaseDate42 = new DateOnly(2025, 10, 20); + num2 = 2; List list104 = new List(num2); CollectionsMarshal.SetCount(list104, num2); - CollectionsMarshal.AsSpan(list104)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added All Saints' Wake 2025 quests and 7.35 Yok Huy rank 4 quests"); - reference103 = new ChangelogEntry("6.25", releaseDate44, list104); - ref ChangelogEntry reference104 = ref span[44]; - DateOnly releaseDate45 = new DateOnly(2025, 10, 16); - num2 = 1; - List list105 = new List(num2); - CollectionsMarshal.SetCount(list105, num2); - CollectionsMarshal.AsSpan(list105)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 4 quests and Deep Dungeon quest"); - reference104 = new ChangelogEntry("6.24", releaseDate45, list105); - ref ChangelogEntry reference105 = ref span[45]; - DateOnly releaseDate46 = new DateOnly(2025, 10, 13); + Span span53 = CollectionsMarshal.AsSpan(list104); + ref ChangeEntry reference104 = ref span53[0]; + num3 = 2; + List list105 = new List(num3); + CollectionsMarshal.SetCount(list105, num3); + Span span54 = CollectionsMarshal.AsSpan(list105); + span54[0] = "Added item count to combat handling rework"; + span54[1] = "Updated Pandora conflicting features"; + reference104 = new ChangeEntry(EChangeCategory.Changed, "Combat handling improvements", list105); + span53[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest to purchase Gysahl Greens if not in inventory"); + reference103 = new ChangelogEntry("6.29", releaseDate42, list104); + ref ChangelogEntry reference105 = ref span[42]; + DateOnly releaseDate43 = new DateOnly(2025, 10, 19); num2 = 1; List list106 = new List(num2); CollectionsMarshal.SetCount(list106, num2); - CollectionsMarshal.AsSpan(list106)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quest (Larder Logistics)"); - reference105 = new ChangelogEntry("6.23", releaseDate46, list106); - ref ChangelogEntry reference106 = ref span[46]; - DateOnly releaseDate47 = new DateOnly(2025, 10, 12); - num2 = 3; + CollectionsMarshal.AsSpan(list106)[0] = new ChangeEntry(EChangeCategory.Changed, "Reworked kill count combat handling - combat and enemy kills are now processed instantly"); + reference105 = new ChangelogEntry("6.28", releaseDate43, list106); + ref ChangelogEntry reference106 = ref span[43]; + DateOnly releaseDate44 = new DateOnly(2025, 10, 18); + num2 = 2; List list107 = new List(num2); CollectionsMarshal.SetCount(list107, num2); - Span span54 = CollectionsMarshal.AsSpan(list107); - span54[0] = new ChangeEntry(EChangeCategory.Changed, "Prevent disabled or Locked quests from being started as 'Start as next quest'"); - span54[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quests"); - span54[2] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Yok Huy quest and journal quest chain priority issues"); - reference106 = new ChangelogEntry("6.22", releaseDate47, list107); - ref ChangelogEntry reference107 = ref span[47]; - DateOnly releaseDate48 = new DateOnly(2025, 10, 12); - num2 = 2; + Span span55 = CollectionsMarshal.AsSpan(list107); + span55[0] = new ChangeEntry(EChangeCategory.Changed, "Improved Aether Current checking logic"); + span55[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Chocobo Taxi Stand CheckSkip error and Patch 7.3 Fantasia unlock quest date/time"); + reference106 = new ChangelogEntry("6.27", releaseDate44, list107); + ref ChangelogEntry reference107 = ref span[44]; + DateOnly releaseDate45 = new DateOnly(2025, 10, 18); + num2 = 1; List list108 = new List(num2); CollectionsMarshal.SetCount(list108, num2); - Span span55 = CollectionsMarshal.AsSpan(list108); - span55[0] = new ChangeEntry(EChangeCategory.Added, "Added expansion abbreviation to journal window"); - span55[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quests"); - reference107 = new ChangelogEntry("6.21", releaseDate48, list108); - ref ChangelogEntry reference108 = ref span[48]; - DateOnly releaseDate49 = new DateOnly(2025, 10, 10); - num2 = 2; + CollectionsMarshal.AsSpan(list108)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 4 quests"); + reference107 = new ChangelogEntry("6.26", releaseDate45, list108); + ref ChangelogEntry reference108 = ref span[45]; + DateOnly releaseDate46 = new DateOnly(2025, 10, 17); + num2 = 1; List list109 = new List(num2); CollectionsMarshal.SetCount(list109, num2); - Span span56 = CollectionsMarshal.AsSpan(list109); - span56[0] = new ChangeEntry(EChangeCategory.Changed, "Allow completed repeatable quests to be used with 'Add quest and requirements to priority' feature"); - span56[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 1 quest (A Work of Cart)"); - reference108 = new ChangelogEntry("6.20", releaseDate49, list109); - ref ChangelogEntry reference109 = ref span[49]; - DateOnly releaseDate50 = new DateOnly(2025, 10, 9); - num2 = 3; + CollectionsMarshal.AsSpan(list109)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added All Saints' Wake 2025 quests and 7.35 Yok Huy rank 4 quests"); + reference108 = new ChangelogEntry("6.25", releaseDate46, list109); + ref ChangelogEntry reference109 = ref span[46]; + DateOnly releaseDate47 = new DateOnly(2025, 10, 16); + num2 = 1; List list110 = new List(num2); CollectionsMarshal.SetCount(list110, num2); - Span span57 = CollectionsMarshal.AsSpan(list110); - span57[0] = new ChangeEntry(EChangeCategory.Added, "Added config to batch Allied Society quest turn-ins"); - span57[1] = new ChangeEntry(EChangeCategory.Changed, "Repeatable quests now show correct availability state in journal"); - span57[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 2 quests"); - reference109 = new ChangelogEntry("6.19", releaseDate50, list110); - ref ChangelogEntry reference110 = ref span[50]; - DateOnly releaseDate51 = new DateOnly(2025, 10, 9); - num2 = 2; + CollectionsMarshal.AsSpan(list110)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 4 quests and Deep Dungeon quest"); + reference109 = new ChangelogEntry("6.24", releaseDate47, list110); + ref ChangelogEntry reference110 = ref span[47]; + DateOnly releaseDate48 = new DateOnly(2025, 10, 13); + num2 = 1; List list111 = new List(num2); CollectionsMarshal.SetCount(list111, num2); - Span span58 = CollectionsMarshal.AsSpan(list111); - span58[0] = new ChangeEntry(EChangeCategory.Changed, "Show once completed quests with improved state display"); - span58[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy daily quest and improvements to various Yok Huy quests"); - reference110 = new ChangelogEntry("6.18", releaseDate51, list111); - ref ChangelogEntry reference111 = ref span[51]; - DateOnly releaseDate52 = new DateOnly(2025, 10, 8); - num2 = 1; + CollectionsMarshal.AsSpan(list111)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quest (Larder Logistics)"); + reference110 = new ChangelogEntry("6.23", releaseDate48, list111); + ref ChangelogEntry reference111 = ref span[48]; + DateOnly releaseDate49 = new DateOnly(2025, 10, 12); + num2 = 3; List list112 = new List(num2); CollectionsMarshal.SetCount(list112, num2); - CollectionsMarshal.AsSpan(list112)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 1 and rank 2 quests"); - reference111 = new ChangelogEntry("6.17", releaseDate52, list112); - ref ChangelogEntry reference112 = ref span[52]; - DateOnly releaseDate53 = new DateOnly(2025, 10, 8); - num2 = 1; + Span span56 = CollectionsMarshal.AsSpan(list112); + span56[0] = new ChangeEntry(EChangeCategory.Changed, "Prevent disabled or Locked quests from being started as 'Start as next quest'"); + span56[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quests"); + span56[2] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Yok Huy quest and journal quest chain priority issues"); + reference111 = new ChangelogEntry("6.22", releaseDate49, list112); + ref ChangelogEntry reference112 = ref span[49]; + DateOnly releaseDate50 = new DateOnly(2025, 10, 12); + num2 = 2; List list113 = new List(num2); CollectionsMarshal.SetCount(list113, num2); - CollectionsMarshal.AsSpan(list113)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Deep Dungeon quest (Faerie Tale)"); - reference112 = new ChangelogEntry("6.16", releaseDate53, list113); - ref ChangelogEntry reference113 = ref span[53]; - DateOnly releaseDate54 = new DateOnly(2025, 10, 8); + Span span57 = CollectionsMarshal.AsSpan(list113); + span57[0] = new ChangeEntry(EChangeCategory.Added, "Added expansion abbreviation to journal window"); + span57[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 3 quests"); + reference112 = new ChangelogEntry("6.21", releaseDate50, list113); + ref ChangelogEntry reference113 = ref span[50]; + DateOnly releaseDate51 = new DateOnly(2025, 10, 10); num2 = 2; List list114 = new List(num2); CollectionsMarshal.SetCount(list114, num2); - Span span59 = CollectionsMarshal.AsSpan(list114); - span59[0] = new ChangeEntry(EChangeCategory.Changed, "Dalamud cleanup"); - span59[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest level requirement check log spam"); - reference113 = new ChangelogEntry("6.15", releaseDate54, list114); - ref ChangelogEntry reference114 = ref span[54]; - DateOnly releaseDate55 = new DateOnly(2025, 10, 8); - num2 = 1; + Span span58 = CollectionsMarshal.AsSpan(list114); + span58[0] = new ChangeEntry(EChangeCategory.Changed, "Allow completed repeatable quests to be used with 'Add quest and requirements to priority' feature"); + span58[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 1 quest (A Work of Cart)"); + reference113 = new ChangelogEntry("6.20", releaseDate51, list114); + ref ChangelogEntry reference114 = ref span[51]; + DateOnly releaseDate52 = new DateOnly(2025, 10, 9); + num2 = 3; List list115 = new List(num2); CollectionsMarshal.SetCount(list115, num2); - CollectionsMarshal.AsSpan(list115)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed abandoned quest check logic if quest were MSQ"); - reference114 = new ChangelogEntry("6.14", releaseDate55, list115); - ref ChangelogEntry reference115 = ref span[55]; - DateOnly releaseDate56 = new DateOnly(2025, 10, 8); + Span span59 = CollectionsMarshal.AsSpan(list115); + span59[0] = new ChangeEntry(EChangeCategory.Added, "Added config to batch Allied Society quest turn-ins"); + span59[1] = new ChangeEntry(EChangeCategory.Changed, "Repeatable quests now show correct availability state in journal"); + span59[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 2 quests"); + reference114 = new ChangelogEntry("6.19", releaseDate52, list115); + ref ChangelogEntry reference115 = ref span[52]; + DateOnly releaseDate53 = new DateOnly(2025, 10, 9); num2 = 2; List list116 = new List(num2); CollectionsMarshal.SetCount(list116, num2); Span span60 = CollectionsMarshal.AsSpan(list116); - ref ChangeEntry reference116 = ref span60[0]; - num3 = 3; - List list117 = new List(num3); - CollectionsMarshal.SetCount(list117, num3); - Span span61 = CollectionsMarshal.AsSpan(list117); - span61[0] = "Context menu option to add required quests and their chain to priority list"; - span61[1] = "AetheryteShortcut to multiple quests"; - span61[2] = "Artisan as a recommended plugin/dependency"; - reference116 = new ChangeEntry(EChangeCategory.Added, "Quest improvements", list117); - span60[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed abandoned quest check and priority list issues"); - reference115 = new ChangelogEntry("6.13", releaseDate56, list116); - ref ChangelogEntry reference117 = ref span[56]; - DateOnly releaseDate57 = new DateOnly(2025, 10, 7); - num2 = 4; + span60[0] = new ChangeEntry(EChangeCategory.Changed, "Show once completed quests with improved state display"); + span60[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy daily quest and improvements to various Yok Huy quests"); + reference115 = new ChangelogEntry("6.18", releaseDate53, list116); + ref ChangelogEntry reference116 = ref span[53]; + DateOnly releaseDate54 = new DateOnly(2025, 10, 8); + num2 = 1; + List list117 = new List(num2); + CollectionsMarshal.SetCount(list117, num2); + CollectionsMarshal.AsSpan(list117)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Yok Huy rank 1 and rank 2 quests"); + reference116 = new ChangelogEntry("6.17", releaseDate54, list117); + ref ChangelogEntry reference117 = ref span[54]; + DateOnly releaseDate55 = new DateOnly(2025, 10, 8); + num2 = 1; List list118 = new List(num2); CollectionsMarshal.SetCount(list118, num2); - Span span62 = CollectionsMarshal.AsSpan(list118); - ref ChangeEntry reference118 = ref span62[0]; - num3 = 4; - List list119 = new List(num3); - CollectionsMarshal.SetCount(list119, num3); - Span span63 = CollectionsMarshal.AsSpan(list119); - span63[0] = "FATE combat handling with auto level syncing"; - span63[1] = "Start accepted quests from journal with 'Start as next quest'"; - span63[2] = "Update quest tracking when quests are hidden or prioritised in game"; - span63[3] = "QuestMap as a recommended plugin/dependency"; - reference118 = new ChangeEntry(EChangeCategory.Added, "FATE and quest tracking", list119); - ref ChangeEntry reference119 = ref span62[1]; - num3 = 3; - List list120 = new List(num3); - CollectionsMarshal.SetCount(list120, num3); - Span span64 = CollectionsMarshal.AsSpan(list120); - span64[0] = "Always prioritise next quest during teleportation/zone transitions"; - span64[1] = "Improved accepted quest logic with abandoned quest detection"; - span64[2] = "Show quests without quest paths as Locked"; - reference119 = new ChangeEntry(EChangeCategory.Changed, "Quest prioritisation improvements", list120); - span62[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Deep Dungeon, Hildibrand, Yok Huy, Monster Hunter Wilds Collab, and Doman Enclave quests"); - span62[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed accepted/active quest display and Hildibrand quest issues"); - reference117 = new ChangelogEntry("6.12", releaseDate57, list118); - ref ChangelogEntry reference120 = ref span[57]; - DateOnly releaseDate58 = new DateOnly(2025, 10, 3); + CollectionsMarshal.AsSpan(list118)[0] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Deep Dungeon quest (Faerie Tale)"); + reference117 = new ChangelogEntry("6.16", releaseDate55, list118); + ref ChangelogEntry reference118 = ref span[55]; + DateOnly releaseDate56 = new DateOnly(2025, 10, 8); + num2 = 2; + List list119 = new List(num2); + CollectionsMarshal.SetCount(list119, num2); + Span span61 = CollectionsMarshal.AsSpan(list119); + span61[0] = new ChangeEntry(EChangeCategory.Changed, "Dalamud cleanup"); + span61[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed quest level requirement check log spam"); + reference118 = new ChangelogEntry("6.15", releaseDate56, list119); + ref ChangelogEntry reference119 = ref span[56]; + DateOnly releaseDate57 = new DateOnly(2025, 10, 8); num2 = 1; + List list120 = new List(num2); + CollectionsMarshal.SetCount(list120, num2); + CollectionsMarshal.AsSpan(list120)[0] = new ChangeEntry(EChangeCategory.Fixed, "Fixed abandoned quest check logic if quest were MSQ"); + reference119 = new ChangelogEntry("6.14", releaseDate57, list120); + ref ChangelogEntry reference120 = ref span[57]; + DateOnly releaseDate58 = new DateOnly(2025, 10, 8); + num2 = 2; List list121 = new List(num2); CollectionsMarshal.SetCount(list121, num2); - CollectionsMarshal.AsSpan(list121)[0] = new ChangeEntry(EChangeCategory.Changed, "Added remaining checks for quest priority to prevent infinite teleport looping"); - reference120 = new ChangelogEntry("6.11", releaseDate58, list121); - ref ChangelogEntry reference121 = ref span[58]; - DateOnly releaseDate59 = new DateOnly(2025, 10, 2); - num2 = 1; - List list122 = new List(num2); - CollectionsMarshal.SetCount(list122, num2); - ref ChangeEntry reference122 = ref CollectionsMarshal.AsSpan(list122)[0]; - num3 = 2; - List list123 = new List(num3); - CollectionsMarshal.SetCount(list123, num3); - Span span65 = CollectionsMarshal.AsSpan(list123); - span65[0] = "Don't show quests as available if player doesn't meet level requirements"; - span65[1] = "Updated 'required for MSQ' text in Crystal Tower quest preset window"; - reference122 = new ChangeEntry(EChangeCategory.Changed, "Quest window improvements", list123); - reference121 = new ChangelogEntry("6.10", releaseDate59, list122); - ref ChangelogEntry reference123 = ref span[59]; - DateOnly releaseDate60 = new DateOnly(2025, 9, 21); - num2 = 5; - List list124 = new List(num2); - CollectionsMarshal.SetCount(list124, num2); - Span span66 = CollectionsMarshal.AsSpan(list124); - ref ChangeEntry reference124 = ref span66[0]; + Span span62 = CollectionsMarshal.AsSpan(list121); + ref ChangeEntry reference121 = ref span62[0]; + num3 = 3; + List list122 = new List(num3); + CollectionsMarshal.SetCount(list122, num3); + Span span63 = CollectionsMarshal.AsSpan(list122); + span63[0] = "Context menu option to add required quests and their chain to priority list"; + span63[1] = "AetheryteShortcut to multiple quests"; + span63[2] = "Artisan as a recommended plugin/dependency"; + reference121 = new ChangeEntry(EChangeCategory.Added, "Quest improvements", list122); + span62[1] = new ChangeEntry(EChangeCategory.Fixed, "Fixed abandoned quest check and priority list issues"); + reference120 = new ChangelogEntry("6.13", releaseDate58, list121); + ref ChangelogEntry reference122 = ref span[58]; + DateOnly releaseDate59 = new DateOnly(2025, 10, 7); + num2 = 4; + List list123 = new List(num2); + CollectionsMarshal.SetCount(list123, num2); + Span span64 = CollectionsMarshal.AsSpan(list123); + ref ChangeEntry reference123 = ref span64[0]; num3 = 4; + List list124 = new List(num3); + CollectionsMarshal.SetCount(list124, num3); + Span span65 = CollectionsMarshal.AsSpan(list124); + span65[0] = "FATE combat handling with auto level syncing"; + span65[1] = "Start accepted quests from journal with 'Start as next quest'"; + span65[2] = "Update quest tracking when quests are hidden or prioritised in game"; + span65[3] = "QuestMap as a recommended plugin/dependency"; + reference123 = new ChangeEntry(EChangeCategory.Added, "FATE and quest tracking", list124); + ref ChangeEntry reference124 = ref span64[1]; + num3 = 3; List list125 = new List(num3); CollectionsMarshal.SetCount(list125, num3); - Span span67 = CollectionsMarshal.AsSpan(list125); - span67[0] = "Reworked event quest handling - automatically displays when events are active"; - span67[1] = "Reworked journal system with improved filtering and display"; - span67[2] = "Reworked Priority Quests tab (Manual Priority and Quest Presets)"; - span67[3] = "Quest path viewer site (https://wigglymuffin.github.io/FFXIV-Tools/)"; - reference124 = new ChangeEntry(EChangeCategory.Added, "Major system reworks", list125); - ref ChangeEntry reference125 = ref span66[1]; - num3 = 4; - List list126 = new List(num3); - CollectionsMarshal.SetCount(list126, num3); - Span span68 = CollectionsMarshal.AsSpan(list126); - span68[0] = "Questionable.IsQuestCompleted"; - span68[1] = "Questionable.IsQuestAvailable"; - span68[2] = "Questionable.IsQuestAccepted"; - span68[3] = "Questionable.IsQuestUnobtainable"; - reference125 = new ChangeEntry(EChangeCategory.Added, "New IPC commands", list126); - ref ChangeEntry reference126 = ref span66[2]; - num3 = 5; - List list127 = new List(num3); - CollectionsMarshal.SetCount(list127, num3); - Span span69 = CollectionsMarshal.AsSpan(list127); - span69[0] = "Improved JSON quest validation with specific error reasons"; - span69[1] = "Added stop at sequence stop condition"; - span69[2] = "Improved Pandora plugin conflict detection"; - span69[3] = "Improved DialogueChoices regex matching"; - span69[4] = "Improved refresh checker for all quest states"; - reference126 = new ChangeEntry(EChangeCategory.Changed, "Various improvements", list127); - span66[3] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.31 Occult Crescent quests"); - span66[4] = new ChangeEntry(EChangeCategory.Fixed, "Fixed cutscene crashes, Single Player Duty triggers, and various quest issues"); - reference123 = new ChangelogEntry("6.9", releaseDate60, list124); - ref ChangelogEntry reference127 = ref span[60]; - DateOnly releaseDate61 = new DateOnly(2025, 9, 2); - num2 = 4; - List list128 = new List(num2); - CollectionsMarshal.SetCount(list128, num2); - Span span70 = CollectionsMarshal.AsSpan(list128); - ref ChangeEntry reference128 = ref span70[0]; - num3 = 4; - List list129 = new List(num3); - CollectionsMarshal.SetCount(list129, num3); - Span span71 = CollectionsMarshal.AsSpan(list129); - span71[0] = "Help commands and priority quest command"; - span71[1] = "Prevent 'CompleteQuest' step setting"; - span71[2] = "Duty counts and controls in 'Quest Battles' tab"; - span71[3] = "'Refresh quest timer' setting (WIP)"; - reference128 = new ChangeEntry(EChangeCategory.Added, "Command and UI improvements", list129); - span70[1] = new ChangeEntry(EChangeCategory.Changed, "Improved 'Clear All' buttons to require CTRL being held"); - span70[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Zodiac quests and 7.31 Cosmic/Occult Crescent quests"); - span70[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Fishing for Friendship and Cosmic Exploration quests"); - reference127 = new ChangelogEntry("6.8", releaseDate61, list128); - ref ChangelogEntry reference129 = ref span[61]; - DateOnly releaseDate62 = new DateOnly(2025, 8, 27); - num2 = 4; - List list130 = new List(num2); - CollectionsMarshal.SetCount(list130, num2); - Span span72 = CollectionsMarshal.AsSpan(list130); - ref ChangeEntry reference130 = ref span72[0]; + Span span66 = CollectionsMarshal.AsSpan(list125); + span66[0] = "Always prioritise next quest during teleportation/zone transitions"; + span66[1] = "Improved accepted quest logic with abandoned quest detection"; + span66[2] = "Show quests without quest paths as Locked"; + reference124 = new ChangeEntry(EChangeCategory.Changed, "Quest prioritisation improvements", list125); + span64[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.35 Deep Dungeon, Hildibrand, Yok Huy, Monster Hunter Wilds Collab, and Doman Enclave quests"); + span64[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed accepted/active quest display and Hildibrand quest issues"); + reference122 = new ChangelogEntry("6.12", releaseDate59, list123); + ref ChangelogEntry reference125 = ref span[59]; + DateOnly releaseDate60 = new DateOnly(2025, 10, 3); + num2 = 1; + List list126 = new List(num2); + CollectionsMarshal.SetCount(list126, num2); + CollectionsMarshal.AsSpan(list126)[0] = new ChangeEntry(EChangeCategory.Changed, "Added remaining checks for quest priority to prevent infinite teleport looping"); + reference125 = new ChangelogEntry("6.11", releaseDate60, list126); + ref ChangelogEntry reference126 = ref span[60]; + DateOnly releaseDate61 = new DateOnly(2025, 10, 2); + num2 = 1; + List list127 = new List(num2); + CollectionsMarshal.SetCount(list127, num2); + ref ChangeEntry reference127 = ref CollectionsMarshal.AsSpan(list127)[0]; num3 = 2; + List list128 = new List(num3); + CollectionsMarshal.SetCount(list128, num3); + Span span67 = CollectionsMarshal.AsSpan(list128); + span67[0] = "Don't show quests as available if player doesn't meet level requirements"; + span67[1] = "Updated 'required for MSQ' text in Crystal Tower quest preset window"; + reference127 = new ChangeEntry(EChangeCategory.Changed, "Quest window improvements", list128); + reference126 = new ChangelogEntry("6.10", releaseDate61, list127); + ref ChangelogEntry reference128 = ref span[61]; + DateOnly releaseDate62 = new DateOnly(2025, 9, 21); + num2 = 5; + List list129 = new List(num2); + CollectionsMarshal.SetCount(list129, num2); + Span span68 = CollectionsMarshal.AsSpan(list129); + ref ChangeEntry reference129 = ref span68[0]; + num3 = 4; + List list130 = new List(num3); + CollectionsMarshal.SetCount(list130, num3); + Span span69 = CollectionsMarshal.AsSpan(list130); + span69[0] = "Reworked event quest handling - automatically displays when events are active"; + span69[1] = "Reworked journal system with improved filtering and display"; + span69[2] = "Reworked Priority Quests tab (Manual Priority and Quest Presets)"; + span69[3] = "Quest path viewer site (https://wigglymuffin.github.io/FFXIV-Tools/)"; + reference129 = new ChangeEntry(EChangeCategory.Added, "Major system reworks", list130); + ref ChangeEntry reference130 = ref span68[1]; + num3 = 4; List list131 = new List(num3); CollectionsMarshal.SetCount(list131, num3); - Span span73 = CollectionsMarshal.AsSpan(list131); - span73[0] = "Icon to 'Clear All' button in stop conditions"; - span73[1] = "Duty counts and 'Enable All' button in 'Duties' tab"; - reference130 = new ChangeEntry(EChangeCategory.Added, "UI improvements", list131); - span72[1] = new ChangeEntry(EChangeCategory.Changed, "Renamed 'Clear' button to 'Clear All' in priority window"); - span72[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Rising 2025 Event Quests"); - span72[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed clipboard assigning blacklist to whitelist in 'Duties' tab"); - reference129 = new ChangelogEntry("6.7", releaseDate62, list130); - ref ChangelogEntry reference131 = ref span[62]; - DateOnly releaseDate63 = new DateOnly(2025, 8, 25); - num2 = 2; - List list132 = new List(num2); - CollectionsMarshal.SetCount(list132, num2); - Span span74 = CollectionsMarshal.AsSpan(list132); - ref ChangeEntry reference132 = ref span74[0]; + Span span70 = CollectionsMarshal.AsSpan(list131); + span70[0] = "Questionable.IsQuestCompleted"; + span70[1] = "Questionable.IsQuestAvailable"; + span70[2] = "Questionable.IsQuestAccepted"; + span70[3] = "Questionable.IsQuestUnobtainable"; + reference130 = new ChangeEntry(EChangeCategory.Added, "New IPC commands", list131); + ref ChangeEntry reference131 = ref span68[2]; + num3 = 5; + List list132 = new List(num3); + CollectionsMarshal.SetCount(list132, num3); + Span span71 = CollectionsMarshal.AsSpan(list132); + span71[0] = "Improved JSON quest validation with specific error reasons"; + span71[1] = "Added stop at sequence stop condition"; + span71[2] = "Improved Pandora plugin conflict detection"; + span71[3] = "Improved DialogueChoices regex matching"; + span71[4] = "Improved refresh checker for all quest states"; + reference131 = new ChangeEntry(EChangeCategory.Changed, "Various improvements", list132); + span68[3] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added 7.31 Occult Crescent quests"); + span68[4] = new ChangeEntry(EChangeCategory.Fixed, "Fixed cutscene crashes, Single Player Duty triggers, and various quest issues"); + reference128 = new ChangelogEntry("6.9", releaseDate62, list129); + ref ChangelogEntry reference132 = ref span[62]; + DateOnly releaseDate63 = new DateOnly(2025, 9, 2); + num2 = 4; + List list133 = new List(num2); + CollectionsMarshal.SetCount(list133, num2); + Span span72 = CollectionsMarshal.AsSpan(list133); + ref ChangeEntry reference133 = ref span72[0]; + num3 = 4; + List list134 = new List(num3); + CollectionsMarshal.SetCount(list134, num3); + Span span73 = CollectionsMarshal.AsSpan(list134); + span73[0] = "Help commands and priority quest command"; + span73[1] = "Prevent 'CompleteQuest' step setting"; + span73[2] = "Duty counts and controls in 'Quest Battles' tab"; + span73[3] = "'Refresh quest timer' setting (WIP)"; + reference133 = new ChangeEntry(EChangeCategory.Added, "Command and UI improvements", list134); + span72[1] = new ChangeEntry(EChangeCategory.Changed, "Improved 'Clear All' buttons to require CTRL being held"); + span72[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Zodiac quests and 7.31 Cosmic/Occult Crescent quests"); + span72[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed Fishing for Friendship and Cosmic Exploration quests"); + reference132 = new ChangelogEntry("6.8", releaseDate63, list133); + ref ChangelogEntry reference134 = ref span[63]; + DateOnly releaseDate64 = new DateOnly(2025, 8, 27); + num2 = 4; + List list135 = new List(num2); + CollectionsMarshal.SetCount(list135, num2); + Span span74 = CollectionsMarshal.AsSpan(list135); + ref ChangeEntry reference135 = ref span74[0]; num3 = 2; - List list133 = new List(num3); - CollectionsMarshal.SetCount(list133, num3); - Span span75 = CollectionsMarshal.AsSpan(list133); - span75[0] = "Missing emotes to schema and emote handler"; - span75[1] = "Improved stop conditions with 'Clear All' button"; - reference132 = new ChangeEntry(EChangeCategory.Added, "Emote support and stop conditions", list133); - span74[1] = new ChangeEntry(EChangeCategory.Changed, "Stop at level functionality"); - reference131 = new ChangelogEntry("6.6", releaseDate63, list132); - ref ChangelogEntry reference133 = ref span[63]; - DateOnly releaseDate64 = new DateOnly(2025, 8, 25); + List list136 = new List(num3); + CollectionsMarshal.SetCount(list136, num3); + Span span75 = CollectionsMarshal.AsSpan(list136); + span75[0] = "Icon to 'Clear All' button in stop conditions"; + span75[1] = "Duty counts and 'Enable All' button in 'Duties' tab"; + reference135 = new ChangeEntry(EChangeCategory.Added, "UI improvements", list136); + span74[1] = new ChangeEntry(EChangeCategory.Changed, "Renamed 'Clear' button to 'Clear All' in priority window"); + span74[2] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added Rising 2025 Event Quests"); + span74[3] = new ChangeEntry(EChangeCategory.Fixed, "Fixed clipboard assigning blacklist to whitelist in 'Duties' tab"); + reference134 = new ChangelogEntry("6.7", releaseDate64, list135); + ref ChangelogEntry reference136 = ref span[64]; + DateOnly releaseDate65 = new DateOnly(2025, 8, 25); num2 = 2; - List list134 = new List(num2); - CollectionsMarshal.SetCount(list134, num2); - Span span76 = CollectionsMarshal.AsSpan(list134); - span76[0] = new ChangeEntry(EChangeCategory.Fixed, "Potential fix to single/solo duties softlocking"); - span76[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added San d'Oria: The Second Walk and various side quests"); - reference133 = new ChangelogEntry("6.5", releaseDate64, list134); + List list137 = new List(num2); + CollectionsMarshal.SetCount(list137, num2); + Span span76 = CollectionsMarshal.AsSpan(list137); + ref ChangeEntry reference137 = ref span76[0]; + num3 = 2; + List list138 = new List(num3); + CollectionsMarshal.SetCount(list138, num3); + Span span77 = CollectionsMarshal.AsSpan(list138); + span77[0] = "Missing emotes to schema and emote handler"; + span77[1] = "Improved stop conditions with 'Clear All' button"; + reference137 = new ChangeEntry(EChangeCategory.Added, "Emote support and stop conditions", list138); + span76[1] = new ChangeEntry(EChangeCategory.Changed, "Stop at level functionality"); + reference136 = new ChangelogEntry("6.6", releaseDate65, list137); + ref ChangelogEntry reference138 = ref span[65]; + DateOnly releaseDate66 = new DateOnly(2025, 8, 25); + num2 = 2; + List list139 = new List(num2); + CollectionsMarshal.SetCount(list139, num2); + Span span78 = CollectionsMarshal.AsSpan(list139); + span78[0] = new ChangeEntry(EChangeCategory.Fixed, "Potential fix to single/solo duties softlocking"); + span78[1] = new ChangeEntry(EChangeCategory.QuestUpdates, "Added San d'Oria: The Second Walk and various side quests"); + reference138 = new ChangelogEntry("6.5", releaseDate66, list139); Changelogs = list; } } diff --git a/Questionable/Questionable.External/NavmeshIpc.cs b/Questionable/Questionable.External/NavmeshIpc.cs index f7fc7b0..1525717 100644 --- a/Questionable/Questionable.External/NavmeshIpc.cs +++ b/Questionable/Questionable.External/NavmeshIpc.cs @@ -43,6 +43,12 @@ internal sealed class NavmeshIpc private readonly ICallGateSubscriber _navRebuild; + private readonly ICallGateSubscriber _simpleMovePathfindAndMoveTo; + + private readonly ICallGateSubscriber _simpleMovePathfindAndMoveCloseTo; + + private readonly ICallGateSubscriber _simpleMovePathfindInProgress; + public bool IsNavmeshAvailable { get @@ -123,6 +129,21 @@ internal sealed class NavmeshIpc } } + public bool IsSimpleMovePathfindInProgress + { + get + { + try + { + return _simpleMovePathfindInProgress.InvokeFunc(); + } + catch (IpcError) + { + return false; + } + } + } + public NavmeshIpc(IDalamudPluginInterface pluginInterface, ILogger logger) { _pluginInterface = pluginInterface; @@ -141,6 +162,9 @@ internal sealed class NavmeshIpc _buildProgress = pluginInterface.GetIpcSubscriber("vnavmesh.Nav.BuildProgress"); _navReload = pluginInterface.GetIpcSubscriber("vnavmesh.Nav.Reload"); _navRebuild = pluginInterface.GetIpcSubscriber("vnavmesh.Nav.Rebuild"); + _simpleMovePathfindAndMoveTo = pluginInterface.GetIpcSubscriber("vnavmesh.SimpleMove.PathfindAndMoveTo"); + _simpleMovePathfindAndMoveCloseTo = pluginInterface.GetIpcSubscriber("vnavmesh.SimpleMove.PathfindAndMoveCloseTo"); + _simpleMovePathfindInProgress = pluginInterface.GetIpcSubscriber("vnavmesh.SimpleMove.PathfindInProgress"); } public void Stop() @@ -280,6 +304,40 @@ internal sealed class NavmeshIpc } } + public bool SimplePathfindAndMoveTo(Vector3 destination, bool fly) + { + if (!IsNavmeshAvailable) + { + return false; + } + try + { + return _simpleMovePathfindAndMoveTo.InvokeFunc(destination, fly); + } + catch (IpcError exception) + { + _logger.LogWarning(exception, "Could not pathfind and move via SimpleMove"); + return false; + } + } + + public bool SimplePathfindAndMoveCloseTo(Vector3 destination, bool fly, float range) + { + if (!IsNavmeshAvailable) + { + return false; + } + try + { + return _simpleMovePathfindAndMoveCloseTo.InvokeFunc(destination, fly, range); + } + catch (IpcError exception) + { + _logger.LogWarning(exception, "Could not pathfind and move close to via SimpleMove"); + return false; + } + } + public List GetWaypoints() { if (IsPathRunning) diff --git a/Questionable/Questionable.Functions/GameFunctions.cs b/Questionable/Questionable.Functions/GameFunctions.cs index dc15082..412d5fd 100644 --- a/Questionable/Questionable.Functions/GameFunctions.cs +++ b/Questionable/Questionable.Functions/GameFunctions.cs @@ -126,7 +126,7 @@ internal sealed class GameFunctions foreach (IGameObject item in _objectTable) { Dalamud.Game.ClientState.Objects.Enums.ObjectKind objectKind = item.ObjectKind; - bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Housing) ? true : false); + bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Pc || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.HousingEventObject) ? true : false); if (!flag && (item == null || item.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || item.IsTargetable) && item.BaseId == dataId && (!kind.HasValue || kind.Value == item.ObjectKind)) { return item; diff --git a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogCategoryComponent.cs b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogCategoryComponent.cs index 9b78ffd..6a009d1 100644 --- a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogCategoryComponent.cs +++ b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogCategoryComponent.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Numerics; using Dalamud.Bindings.ImGui; @@ -41,41 +40,26 @@ internal static class ChangelogCategoryComponent { float cursorPosY = ImGui.GetCursorPosY(); ImGui.SetCursorPosX(baseX); - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.TextColored(in color, icon.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); ImGui.SetCursorPosY(cursorPosY); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, color, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, color)) { ImGui.TextUnformatted(text); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } private static void DrawChange(ChangeEntry change, float baseX, float changeIndent) { ImGui.SetCursorPosX(baseX + changeIndent); float cursorPosY = ImGui.GetCursorPosY(); - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), FontAwesomeIcon.CaretRight.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); ImGui.SetCursorPosY(cursorPosY); float num = ImGui.GetContentRegionAvail().X - 8f; @@ -95,15 +79,10 @@ internal static class ChangelogCategoryComponent { ImGui.SetCursorPosX(baseX + num); float cursorPosY = ImGui.GetCursorPosY(); - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.92f, 1f), FontAwesomeIcon.AngleRight.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); ImGui.SetCursorPosY(cursorPosY); float num2 = ImGui.GetContentRegionAvail().X - 8f; diff --git a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogEntryComponent.cs b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogEntryComponent.cs index 3648a16..28267b1 100644 --- a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogEntryComponent.cs +++ b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogEntryComponent.cs @@ -37,28 +37,20 @@ internal sealed class ChangelogEntryComponent string text2 = "v" + changelog.Version; float fontSize = ImGui.GetFontSize(); float num = fontSize; - FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true); Vector2 versionSize; - try + using (ImRaii.PushFont(UiBuilder.MonoFont)) { versionSize = ImGui.CalcTextSize(text2); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector2 dateSize = ImGui.CalcTextSize(text); float scaledIconFontSize = fontSize * 0.85f; float x = ImGui.GetContentRegionAvail().X; - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Header, new Vector4(0.2f, 0.18f, 0.25f, 0.6f), true); bool flag; - try + using (ImRaii.PushColor(ImGuiCol.Header, new Vector4(0.2f, 0.18f, 0.25f, 0.6f))) { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f), true); - try + using (ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f))) { - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f))) { Vector2 cursorPos = ImGui.GetCursorPos(); Vector2 cursorScreenPos = ImGui.GetCursorScreenPos(); @@ -75,19 +67,7 @@ internal sealed class ChangelogEntryComponent DrawDateWithIcon(text, dateSize, scaledIconFontSize, cursorScreenPos, cursorPos, x, verticalOffset, fontSize); ImGui.SetCursorPos(cursorPos2); } - finally - { - ((IDisposable)val4)?.Dispose(); - } } - finally - { - ((IDisposable)val3)?.Dispose(); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); } if (flag) { @@ -98,16 +78,11 @@ internal sealed class ChangelogEntryComponent private static void DrawVersionText(string versionText, Vector2 versionSize, Vector2 headerStartPos, float verticalOffset) { float x = headerStartPos.X + ImGui.GetStyle().FramePadding.X * 2f + 20f; - FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true); - try + using (ImRaii.PushFont(UiBuilder.MonoFont)) { ImGui.SetCursorPos(new Vector2(x, headerStartPos.Y + verticalOffset)); ImGui.TextColored(new Vector4(0.95f, 0.95f, 0.95f, 1f), versionText); } - finally - { - ((IDisposable)val)?.Dispose(); - } } private void DrawNewBadge(bool isNew, Vector2 headerStartScreenPos, float availableWidth) @@ -125,16 +100,11 @@ internal sealed class ChangelogEntryComponent private static void DrawDateWithIcon(string dateText, Vector2 dateSize, float scaledIconFontSize, Vector2 headerStartScreenPos, Vector2 headerStartPos, float availableWidth, float verticalOffset, float defaultFontSize) { string text = FontAwesomeIcon.Calendar.ToIconString(); - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); Vector2 vector; - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { vector = ImGui.CalcTextSize(text); } - finally - { - ((IDisposable)val)?.Dispose(); - } float num = vector.X * (scaledIconFontSize / defaultFontSize); float num2 = num + 4f + dateSize.X; float num3 = availableWidth - num2 - 12f; diff --git a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogFooterComponent.cs b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogFooterComponent.cs index 2a6b2e9..558e6bc 100644 --- a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogFooterComponent.cs +++ b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogFooterComponent.cs @@ -19,33 +19,18 @@ internal sealed class ChangelogFooterComponent float num = 120f; float num2 = (ImGui.GetContentRegionAvail().X - num) * 0.5f; ImGui.SetCursorPosX(ImGui.GetCursorPosX() + num2); - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.55f, 0.45f, 0.75f, 0.6f), true); - try + using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.55f, 0.45f, 0.75f, 0.6f))) { - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.8f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.8f))) { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.75f, 0.55f, 0.95f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.75f, 0.55f, 0.95f, 1f))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.CheckCircle, "Got It!")) { onConfirm(); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((IDisposable)val)?.Dispose(); } } } diff --git a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogHeaderComponent.cs b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogHeaderComponent.cs index 6b25961..a485d74 100644 --- a/Questionable/Questionable.Windows.ChangelogComponents/ChangelogHeaderComponent.cs +++ b/Questionable/Questionable.Windows.ChangelogComponents/ChangelogHeaderComponent.cs @@ -162,8 +162,7 @@ internal sealed class ChangelogHeaderComponent drawList.AddCircleFilled(center, num * 0.4f, col); DrawAnimatedCross(drawList, center, flag); ImGui.SetCursorScreenPos(vector); - ImGui.InvisibleButton("CloseButton", new Vector2(num, num)); - if (ImGui.IsItemClicked()) + if (ImGui.InvisibleButton("CloseButton", new Vector2(num, num))) { onCloseClicked(obj: false); } @@ -200,8 +199,7 @@ internal sealed class ChangelogHeaderComponent { float num = MathF.Sin(_animationTime * 2f) * 3f; float num2 = MathF.Sin(_animationTime * 1.5f + (float)Math.PI / 2f) * 1.5f; - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { string text = FontAwesomeIcon.FileAlt.ToIconString(); ImGui.SetCursorPosX(centerX - ImGui.CalcTextSize(text).X * 0.5f + num2); @@ -214,10 +212,6 @@ internal sealed class ChangelogHeaderComponent ImGui.TextColored(new Vector4(0.75f, 0.55f, 0.95f, 1f), text); ImGui.PopStyleVar(); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SetCursorPosY(ImGui.GetCursorPosY() - num + 4f); } @@ -225,8 +219,7 @@ internal sealed class ChangelogHeaderComponent { float num = MathF.Max(0f, 1f - (_animationTime - 0.1f) * 3f); float num2 = num * num * (3f - 2f * num) * 20f; - FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true); - try + using (ImRaii.PushFont(UiBuilder.MonoFont)) { string text = "What's New in Questionable?"; ImGui.SetCursorPosX(centerX - ImGui.CalcTextSize(text).X * 0.5f - num2); @@ -234,10 +227,6 @@ internal sealed class ChangelogHeaderComponent ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), text); ImGui.PopStyleVar(); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 6f); } diff --git a/Questionable/Questionable.Windows.ConfigComponents/BlacklistConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/BlacklistConfigComponent.cs index f724da6..8f2f5b0 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/BlacklistConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/BlacklistConfigComponent.cs @@ -51,175 +51,136 @@ internal sealed class BlacklistConfigComponent : ConfigComponent public override void DrawTab() { - //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_00a5: Unknown result type (might be due to invalid IL or missing references) - //IL_00aa: Unknown result type (might be due to invalid IL or missing references) - //IL_00ab: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Blacklist###QuestBlacklist"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Blacklist###QuestBlacklist"); + if (!tabItemDisposable) { - if (!val) + return; + } + ImGui.TextWrapped("Blacklisted quests will never be automatically picked up or executed by Questionable."); + ImGui.TextWrapped("Use this to permanently skip specific quests you don't want to do."); + ImGui.Separator(); + DrawCurrentlyAcceptedQuests(); + HashSet blacklistedQuests = base.Configuration.General.BlacklistedQuests; + ImU8String text = new ImU8String(22, 1); + text.AppendLiteral("Blacklisted Quests ("); + text.AppendFormatted(blacklistedQuests.Count); + text.AppendLiteral("):"); + ImGui.Text(text); + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("BlacklistedQuestsList", new Vector2(-1f, 200f), border: true)) + { + if ((bool)childDisposable) { - return; - } - ImGui.TextWrapped("Blacklisted quests will never be automatically picked up or executed by Questionable."); - ImGui.TextWrapped("Use this to permanently skip specific quests you don't want to do."); - ImGui.Separator(); - DrawCurrentlyAcceptedQuests(); - HashSet blacklistedQuests = base.Configuration.General.BlacklistedQuests; - ImU8String text = new ImU8String(22, 1); - text.AppendLiteral("Blacklisted Quests ("); - text.AppendFormatted(blacklistedQuests.Count); - text.AppendLiteral("):"); - ImGui.Text(text); - ChildDisposable val2 = ImRaii.Child((ImU8String)"BlacklistedQuestsList", new Vector2(-1f, 200f), true); - try - { - if (ChildDisposable.op_Implicit(val2)) + if (blacklistedQuests.Count > 0) { - if (blacklistedQuests.Count > 0) + ElementId elementId = null; + int num = 0; + foreach (ElementId item in blacklistedQuests.OrderBy((ElementId x) => x.ToString())) { - ElementId elementId = null; - int num = 0; - foreach (ElementId item in blacklistedQuests.OrderBy((ElementId x) => x.ToString())) + if (!_questRegistry.TryGetQuest(item, out Quest quest)) { - IdDisposable val3; - if (!_questRegistry.TryGetQuest(item, out Quest quest)) + ImU8String id = new ImU8String(5, 1); + id.AppendLiteral("Quest"); + id.AppendFormatted(item); + using (ImRaii.PushId(id)) { - ImU8String imU8String = new ImU8String(5, 1); - imU8String.AppendLiteral("Quest"); - imU8String.AppendFormatted(item); - val3 = ImRaii.PushId(imU8String, true); - try - { - ImGui.AlignTextToFramePadding(); - Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f); - ImU8String text2 = new ImU8String(16, 1); - text2.AppendLiteral("Unknown Quest ("); - text2.AppendFormatted(item); - text2.AppendLiteral(")"); - ImGui.TextColored(in col, text2); - ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); - if (ImGuiComponents.IconButton($"##Remove{num}", FontAwesomeIcon.Times)) - { - elementId = item; - } - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - num++; - continue; - } - ImU8String imU8String2 = new ImU8String(5, 1); - imU8String2.AppendLiteral("Quest"); - imU8String2.AppendFormatted(item); - val3 = ImRaii.PushId(imU8String2, true); - try - { - (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(item); - bool flag; - using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push()) - { - ImGui.AlignTextToFramePadding(); - ImGui.TextColored(in questStyle.Item1, questStyle.Item2.ToIconString()); - flag = ImGui.IsItemHovered(); - } - ImGui.SameLine(); ImGui.AlignTextToFramePadding(); - ImGui.TextUnformatted(quest.Info.Name); - flag |= ImGui.IsItemHovered(); - if (flag) - { - _questTooltipComponent.Draw(quest.Info); - } + Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f); + ImU8String text2 = new ImU8String(16, 1); + text2.AppendLiteral("Unknown Quest ("); + text2.AppendFormatted(item); + text2.AppendLiteral(")"); + ImGui.TextColored(in col, text2); ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); if (ImGuiComponents.IconButton($"##Remove{num}", FontAwesomeIcon.Times)) { elementId = item; } - if (ImGui.IsItemHovered()) - { - ImGui.SetTooltip("Remove from blacklist"); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); } num++; + continue; } - if (elementId != null) + ImU8String id2 = new ImU8String(5, 1); + id2.AppendLiteral("Quest"); + id2.AppendFormatted(item); + using (ImRaii.PushId(id2)) { - base.Configuration.General.BlacklistedQuests.Remove(elementId); - Save(); + (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(item); + bool flag; + using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push()) + { + ImGui.AlignTextToFramePadding(); + ImGui.TextColored(in questStyle.Item1, questStyle.Item2.ToIconString()); + flag = ImGui.IsItemHovered(); + } + ImGui.SameLine(); + ImGui.AlignTextToFramePadding(); + ImGui.TextUnformatted(quest.Info.Name); + flag |= ImGui.IsItemHovered(); + if (flag) + { + _questTooltipComponent.Draw(quest.Info); + } + ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); + if (ImGuiComponents.IconButton($"##Remove{num}", FontAwesomeIcon.Times)) + { + elementId = item; + } + if (ImGui.IsItemHovered()) + { + ImGui.SetTooltip("Remove from blacklist"); + } } + num++; } - else + if (elementId != null) { - ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0.7f, 0.7f, 0.7f, 1f)); - ImGui.TextWrapped("No quests blacklisted. Use the dropdown above or add from currently accepted quests."); - ImGui.PopStyleColor(); + base.Configuration.General.BlacklistedQuests.Remove(elementId); + Save(); } } - } - finally - { - ((ChildDisposable)(ref val2)).Dispose(); - } - _questSelector.DrawSelection(); - if (blacklistedQuests.Count <= 0) - { - return; - } - DisabledDisposable val4 = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try - { - if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) + else { - base.Configuration.General.BlacklistedQuests.Clear(); - Save(); + ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0.7f, 0.7f, 0.7f, 1f)); + ImGui.TextWrapped("No quests blacklisted. Use the dropdown above or add from currently accepted quests."); + ImGui.PopStyleColor(); } } - finally - { - ((IDisposable)val4)?.Dispose(); - } - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) - { - ImGui.SetTooltip("Hold CTRL to enable this button."); - } } - finally + _questSelector.DrawSelection(); + if (blacklistedQuests.Count <= 0) { - ((TabItemDisposable)(ref val)).Dispose(); + return; + } + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) + { + if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) + { + base.Configuration.General.BlacklistedQuests.Clear(); + Save(); + } + } + if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) + { + ImGui.SetTooltip("Hold CTRL to enable this button."); } } private void DrawCurrentlyAcceptedQuests() { - //IL_0030: Unknown result type (might be due to invalid IL or missing references) - //IL_0035: Unknown result type (might be due to invalid IL or missing references) - //IL_0036: Unknown result type (might be due to invalid IL or missing references) List currentlyAcceptedQuests = GetCurrentlyAcceptedQuests(); ImGui.Text("Currently Accepted Quests:"); - ChildDisposable val = ImRaii.Child((ImU8String)"AcceptedQuestsList", new Vector2(-1f, 100f), true); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("AcceptedQuestsList", new Vector2(-1f, 100f), border: true)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { if (currentlyAcceptedQuests.Count > 0) { foreach (Quest item in currentlyAcceptedQuests) { - ImU8String imU8String = new ImU8String(13, 1); - imU8String.AppendLiteral("AcceptedQuest"); - imU8String.AppendFormatted(item.Id); - IdDisposable val2 = ImRaii.PushId(imU8String, true); - try + ImU8String id = new ImU8String(13, 1); + id.AppendLiteral("AcceptedQuest"); + id.AppendFormatted(item.Id); + using (ImRaii.PushId(id)) { (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(item.Id); bool flag = false; @@ -238,8 +199,7 @@ internal sealed class BlacklistConfigComponent : ConfigComponent _questTooltipComponent.Draw(item.Info); } ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.CalcTextSize(FontAwesomeIcon.Ban.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); - DisabledDisposable val3 = ImRaii.Disabled(flag2); - try + using (ImRaii.Disabled(flag2)) { if (ImGuiComponents.IconButton($"##Blacklist{item.Id}", FontAwesomeIcon.Ban)) { @@ -247,19 +207,11 @@ internal sealed class BlacklistConfigComponent : ConfigComponent Save(); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip(flag2 ? "Quest already blacklisted" : "Add this quest to blacklist"); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } } } else @@ -270,10 +222,6 @@ internal sealed class BlacklistConfigComponent : ConfigComponent } } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } ImGui.Spacing(); } diff --git a/Questionable/Questionable.Windows.ConfigComponents/ConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/ConfigComponent.cs index be8d3b0..13aed72 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/ConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/ConfigComponent.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; @@ -59,52 +58,31 @@ internal abstract class ConfigComponent protected static void DrawNotes(bool enabledByDefault, IEnumerable notes) { - //IL_0000: Unknown result type (might be due to invalid IL or missing references) - //IL_0006: Expected O, but got Unknown - //IL_0071: Unknown result type (might be due to invalid IL or missing references) - //IL_0076: Unknown result type (might be due to invalid IL or missing references) - ColorDisposable val = new ColorDisposable(); - try + using ImRaii.ColorDisposable colorDisposable = new ImRaii.ColorDisposable(); + colorDisposable.Push(ImGuiCol.TextDisabled, (!enabledByDefault) ? ImGuiColors.DalamudYellow : ImGuiColors.ParsedBlue); + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) { - val.Push(ImGuiCol.TextDisabled, (!enabledByDefault) ? ImGuiColors.DalamudYellow : ImGuiColors.ParsedBlue, true); - ImGui.SameLine(); - FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + if (!enabledByDefault) { - if (!enabledByDefault) - { - ImGui.TextDisabled(FontAwesomeIcon.ExclamationTriangle.ToIconString()); - } - else - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } + ImGui.TextDisabled(FontAwesomeIcon.ExclamationTriangle.ToIconString()); } - finally + else { - ((IDisposable)val2)?.Dispose(); - } - if (!ImGui.IsItemHovered()) - { - return; - } - TooltipDisposable val3 = ImRaii.Tooltip(); - try - { - ImGui.TextColored(ImGuiColors.DalamudYellow, "While testing, the following issues have been found:"); - foreach (string note in notes) - { - ImGui.BulletText(note); - } - } - finally - { - ((TooltipDisposable)(ref val3)).Dispose(); + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); } } - finally + if (!ImGui.IsItemHovered()) { - ((IDisposable)val)?.Dispose(); + return; + } + using (ImRaii.Tooltip()) + { + ImGui.TextColored(ImGuiColors.DalamudYellow, "While testing, the following issues have been found:"); + foreach (string note in notes) + { + ImGui.BulletText(note); + } } } } diff --git a/Questionable/Questionable.Windows.ConfigComponents/DebugConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/DebugConfigComponent.cs index 6521301..9e75e41 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/DebugConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/DebugConfigComponent.cs @@ -1,4 +1,3 @@ -using System; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; @@ -16,150 +15,118 @@ internal sealed class DebugConfigComponent : ConfigComponent public override void DrawTab() { - //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) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Advanced###Debug"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Advanced###Debug"); + if (!tabItemDisposable) { - if (!val) + return; + } + ImGui.TextColored(ImGuiColors.DalamudRed, "Enabling any option here may cause unexpected behavior. Use at your own risk."); + ImGui.Separator(); + DrawChocoboSettings(); + ImGui.Separator(); + bool v = base.Configuration.Advanced.DebugOverlay; + if (ImGui.Checkbox("Enable debug overlay", ref v)) + { + base.Configuration.Advanced.DebugOverlay = v; + Save(); + } + using (ImRaii.Disabled(!v)) + { + using (ImRaii.PushIndent()) { - return; - } - ImGui.TextColored(ImGuiColors.DalamudRed, "Enabling any option here may cause unexpected behavior. Use at your own risk."); - ImGui.Separator(); - DrawChocoboSettings(); - ImGui.Separator(); - bool v = base.Configuration.Advanced.DebugOverlay; - if (ImGui.Checkbox("Enable debug overlay", ref v)) - { - base.Configuration.Advanced.DebugOverlay = v; - Save(); - } - DisabledDisposable val2 = ImRaii.Disabled(!v); - IndentDisposable val3; - try - { - val3 = ImRaii.PushIndent(1, true); - try + bool v2 = base.Configuration.Advanced.CombatDataOverlay; + if (ImGui.Checkbox("Enable combat data overlay", ref v2)) { - bool v2 = base.Configuration.Advanced.CombatDataOverlay; - if (ImGui.Checkbox("Enable combat data overlay", ref v2)) - { - base.Configuration.Advanced.CombatDataOverlay = v2; - Save(); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); + base.Configuration.Advanced.CombatDataOverlay = v2; + Save(); } } - finally + } + bool v3 = base.Configuration.Advanced.NeverFly; + if (ImGui.Checkbox("Disable flying (even if unlocked for the zone)", ref v3)) + { + base.Configuration.Advanced.NeverFly = v3; + Save(); + } + bool v4 = base.Configuration.Advanced.AdditionalStatusInformation; + if (ImGui.Checkbox("Draw additional status information", ref v4)) + { + base.Configuration.Advanced.AdditionalStatusInformation = v4; + Save(); + } + bool v5 = base.Configuration.Advanced.DisablePartyWatchdog; + if (ImGui.Checkbox("Disable Party Watchdog", ref v5)) + { + base.Configuration.Advanced.DisablePartyWatchdog = v5; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("The Party Watchdog stops Questionable when entering certain zones with other party members, or when entering unsupported content. Disabling this allows Questionable to continue working while in a party, but may cause unexpected behavior in group content."); + ImGui.Separator(); + ImGui.Text("AutoDuty Settings"); + using (ImRaii.PushIndent()) + { + ImGui.AlignTextToFramePadding(); + bool v6 = base.Configuration.Advanced.DisableAutoDutyBareMode; + if (ImGui.Checkbox("Use Pre-Loop/Loop/Post-Loop settings", ref v6)) { - ((IDisposable)val2)?.Dispose(); - } - bool v3 = base.Configuration.Advanced.NeverFly; - if (ImGui.Checkbox("Disable flying (even if unlocked for the zone)", ref v3)) - { - base.Configuration.Advanced.NeverFly = v3; - Save(); - } - bool v4 = base.Configuration.Advanced.AdditionalStatusInformation; - if (ImGui.Checkbox("Draw additional status information", ref v4)) - { - base.Configuration.Advanced.AdditionalStatusInformation = v4; - Save(); - } - bool v5 = base.Configuration.Advanced.DisablePartyWatchdog; - if (ImGui.Checkbox("Disable Party Watchdog", ref v5)) - { - base.Configuration.Advanced.DisablePartyWatchdog = v5; + base.Configuration.Advanced.DisableAutoDutyBareMode = v6; Save(); } ImGui.SameLine(); - ImGuiComponents.HelpMarker("The Party Watchdog stops Questionable when entering certain zones with other party members, or when entering unsupported content. Disabling this allows Questionable to continue working while in a party, but may cause unexpected behavior in group content."); - ImGui.Separator(); - ImGui.Text("AutoDuty Settings"); - val3 = ImRaii.PushIndent(1, true); - try - { - ImGui.AlignTextToFramePadding(); - bool v6 = base.Configuration.Advanced.DisableAutoDutyBareMode; - if (ImGui.Checkbox("Use Pre-Loop/Loop/Post-Loop settings", ref v6)) - { - base.Configuration.Advanced.DisableAutoDutyBareMode = v6; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("Typically, the loop settings for AutoDuty are disabled when running dungeons with Questionable, since they can cause issues (or even shut down your PC)."); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - ImGui.Separator(); - ImGui.Text("Quest/Interaction Skips"); - val3 = ImRaii.PushIndent(1, true); - try - { - bool v7 = base.Configuration.Advanced.SkipAetherCurrents; - if (ImGui.Checkbox("Don't pick up aether currents/aether current quests", ref v7)) - { - base.Configuration.Advanced.SkipAetherCurrents = v7; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("If not done during the MSQ by Questionable, you have to manually pick up any missed aether currents/quests. There is no way to automatically pick up all missing aether currents."); - bool v8 = base.Configuration.Advanced.SkipClassJobQuests; - if (ImGui.Checkbox("Don't pick up class/job/role quests", ref v8)) - { - base.Configuration.Advanced.SkipClassJobQuests = v8; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("Class and job skills for A Realm Reborn, Heavensward and (for the Lv70 skills) Stormblood are locked behind quests. Not recommended if you plan on queueing for instances with duty finder/party finder.\n\nNote: This setting is ignored for the first class/job quest if your character is not high enough level to start the level 4 MSQ."); - bool v9 = base.Configuration.Advanced.SkipARealmRebornHardModePrimals; - if (ImGui.Checkbox("Don't pick up ARR hard mode primal quests", ref v9)) - { - base.Configuration.Advanced.SkipARealmRebornHardModePrimals = v9; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("Hard mode Ifrit/Garuda/Titan are required for the Patch 2.5 quest 'Good Intentions' and to start Heavensward."); - bool v10 = base.Configuration.Advanced.SkipCrystalTowerRaids; - if (ImGui.Checkbox("Don't pick up Crystal Tower quests", ref v10)) - { - base.Configuration.Advanced.SkipCrystalTowerRaids = v10; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("Crystal Tower raids are required for the Patch 2.55 quest 'A Time to Every Purpose' and to start Heavensward."); - bool v11 = base.Configuration.Advanced.PreventQuestCompletion; - if (ImGui.Checkbox("Prevent quest completion", ref v11)) - { - base.Configuration.Advanced.PreventQuestCompletion = v11; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("When enabled, Questionable will not attempt to turn-in and complete quests. This will do everything automatically except the final turn-in step."); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } + ImGuiComponents.HelpMarker("Typically, the loop settings for AutoDuty are disabled when running dungeons with Questionable, since they can cause issues (or even shut down your PC)."); } - finally + ImGui.Separator(); + ImGui.Text("Quest/Interaction Skips"); + using (ImRaii.PushIndent()) { - ((TabItemDisposable)(ref val)).Dispose(); + bool v7 = base.Configuration.Advanced.SkipAetherCurrents; + if (ImGui.Checkbox("Don't pick up aether currents/aether current quests", ref v7)) + { + base.Configuration.Advanced.SkipAetherCurrents = v7; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("If not done during the MSQ by Questionable, you have to manually pick up any missed aether currents/quests. There is no way to automatically pick up all missing aether currents."); + bool v8 = base.Configuration.Advanced.SkipClassJobQuests; + if (ImGui.Checkbox("Don't pick up class/job/role quests", ref v8)) + { + base.Configuration.Advanced.SkipClassJobQuests = v8; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("Class and job skills for A Realm Reborn, Heavensward and (for the Lv70 skills) Stormblood are locked behind quests. Not recommended if you plan on queueing for instances with duty finder/party finder.\n\nNote: This setting is ignored for the first class/job quest if your character is not high enough level to start the level 4 MSQ."); + bool v9 = base.Configuration.Advanced.SkipARealmRebornHardModePrimals; + if (ImGui.Checkbox("Don't pick up ARR hard mode primal quests", ref v9)) + { + base.Configuration.Advanced.SkipARealmRebornHardModePrimals = v9; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("Hard mode Ifrit/Garuda/Titan are required for the Patch 2.5 quest 'Good Intentions' and to start Heavensward."); + bool v10 = base.Configuration.Advanced.SkipCrystalTowerRaids; + if (ImGui.Checkbox("Don't pick up Crystal Tower quests", ref v10)) + { + base.Configuration.Advanced.SkipCrystalTowerRaids = v10; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("Crystal Tower raids are required for the Patch 2.55 quest 'A Time to Every Purpose' and to start Heavensward."); + bool v11 = base.Configuration.Advanced.PreventQuestCompletion; + if (ImGui.Checkbox("Prevent quest completion", ref v11)) + { + base.Configuration.Advanced.PreventQuestCompletion = v11; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("When enabled, Questionable will not attempt to turn-in and complete quests. This will do everything automatically except the final turn-in step."); } } private void DrawChocoboSettings() { ImGui.Text("Chocobo Settings"); - IndentDisposable val = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { ImGui.AlignTextToFramePadding(); ImGui.Text("Chocobo Name:"); @@ -180,10 +147,6 @@ internal sealed class DebugConfigComponent : ConfigComponent ImGui.SameLine(); ImGuiComponents.HelpMarker("The name to give your chocobo during the 'My Little Chocobo' quest.\nMust be 2-20 characters. First letter will be capitalized.\nIf left empty, defaults to 'Kweh'."); } - finally - { - ((IDisposable)val)?.Dispose(); - } } private static string FormatChocoboName(string name) diff --git a/Questionable/Questionable.Windows.ConfigComponents/DutyConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/DutyConfigComponent.cs index 922c3eb..399d64f 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/DutyConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/DutyConfigComponent.cs @@ -106,398 +106,285 @@ internal sealed class DutyConfigComponent : ConfigComponent public override void DrawTab() { - //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_0260: Unknown result type (might be due to invalid IL or missing references) - //IL_0265: Unknown result type (might be due to invalid IL or missing references) - //IL_0267: Unknown result type (might be due to invalid IL or missing references) - //IL_027d: Unknown result type (might be due to invalid IL or missing references) - //IL_0282: Unknown result type (might be due to invalid IL or missing references) - //IL_0284: Unknown result type (might be due to invalid IL or missing references) - //IL_02ae: Unknown result type (might be due to invalid IL or missing references) - //IL_02b3: Unknown result type (might be due to invalid IL or missing references) - //IL_02b5: Unknown result type (might be due to invalid IL or missing references) - //IL_02df: Unknown result type (might be due to invalid IL or missing references) - //IL_02e4: Unknown result type (might be due to invalid IL or missing references) - //IL_02e6: Unknown result type (might be due to invalid IL or missing references) - //IL_0310: Unknown result type (might be due to invalid IL or missing references) - //IL_0315: Unknown result type (might be due to invalid IL or missing references) - //IL_0317: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Duties###Duties"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Duties###Duties"); + if (!tabItemDisposable) { - if (!val) + return; + } + bool v = base.Configuration.Duties.RunInstancedContentWithAutoDuty; + if (ImGui.Checkbox("Run instanced content with AutoDuty and BossMod", ref v)) + { + base.Configuration.Duties.RunInstancedContentWithAutoDuty = v; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("The combat module used for this is configured by AutoDuty, ignoring whichever selection you've made in Questionable's \"General\" configuration."); + using (ImRaii.Disabled(!v)) + { + using (ImRaii.PushIndent(ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X)) { - return; + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) + { + ImGui.TextUnformatted("Work in Progress:"); + ImGui.BulletText("Duty Support mode is limited."); + ImGui.BulletText("Unsynced modes require being significantly overleveled or having a high-level party member."); + ImGui.BulletText("Most players will need to use Duty Support mode when progressing normally through the game."); + } } - bool v = base.Configuration.Duties.RunInstancedContentWithAutoDuty; - if (ImGui.Checkbox("Run instanced content with AutoDuty and BossMod", ref v)) + ImGui.Spacing(); + bool v2 = base.Configuration.Duties.RunLevelingModeWhenUnderleveled; + if (ImGui.Checkbox("Run AutoDuty Leveling mode when underleveled for MSQ", ref v2)) { - base.Configuration.Duties.RunInstancedContentWithAutoDuty = v; + base.Configuration.Duties.RunLevelingModeWhenUnderleveled = v2; Save(); } ImGui.SameLine(); - ImGuiComponents.HelpMarker("The combat module used for this is configured by AutoDuty, ignoring whichever selection you've made in Questionable's \"General\" configuration."); - DisabledDisposable val2 = ImRaii.Disabled(!v); - try + ImGuiComponents.HelpMarker("When enabled, Questionable will automatically run AutoDuty's Leveling mode when your character is underleveled for the next Main Scenario Quest.\n\nLeveling mode runs the highest available dungeon for your level to gain XP.\n\nThis is useful for characters without the Road to 90 XP buff who may not have enough XP to continue the MSQ."); + ImGui.Spacing(); + ImGui.Text("Default duty mode:"); + ImGui.SameLine(); + int currentItem = (int)base.Configuration.Duties.DefaultDutyMode; + ImGui.SetNextItemWidth(200f); + if (ImGui.Combo((ImU8String)"##DefaultDutyMode", ref currentItem, (ReadOnlySpan)DutyModeLabels, DutyModeLabels.Length)) { - IndentDisposable val3 = ImRaii.PushIndent(ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X, true, true); - try - { - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try - { - ImGui.TextUnformatted("Work in Progress:"); - ImGui.BulletText("Duty Support mode is limited."); - ImGui.BulletText("Unsynced modes require being significantly overleveled or having a high-level party member."); - ImGui.BulletText("Most players will need to use Duty Support mode when progressing normally through the game."); - } - finally - { - ((IDisposable)val4)?.Dispose(); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - ImGui.Spacing(); - bool v2 = base.Configuration.Duties.RunLevelingModeWhenUnderleveled; - if (ImGui.Checkbox("Run AutoDuty Leveling mode when underleveled for MSQ", ref v2)) - { - base.Configuration.Duties.RunLevelingModeWhenUnderleveled = v2; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("When enabled, Questionable will automatically run AutoDuty's Leveling mode when your character is underleveled for the next Main Scenario Quest.\n\nLeveling mode runs the highest available dungeon for your level to gain XP.\n\nThis is useful for characters without the Road to 90 XP buff who may not have enough XP to continue the MSQ."); - ImGui.Spacing(); - ImGui.Text("Default duty mode:"); - ImGui.SameLine(); - int currentItem = (int)base.Configuration.Duties.DefaultDutyMode; - ImGui.SetNextItemWidth(200f); - if (ImGui.Combo((ImU8String)"##DefaultDutyMode", ref currentItem, (ReadOnlySpan)DutyModeLabels, DutyModeLabels.Length)) - { - base.Configuration.Duties.DefaultDutyMode = (EDutyMode)currentItem; - Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker("\ufffd Duty Support: Run with NPC party members (level synced)\n\ufffd Unsync (Solo): Run alone at your current level (unsynced)\n\ufffd Unsync (Party): Run with your party at current level (unsynced)\n\nYou can override this setting for individual duties below."); + base.Configuration.Duties.DefaultDutyMode = (EDutyMode)currentItem; + Save(); } - finally + ImGui.SameLine(); + ImGuiComponents.HelpMarker("\ufffd Duty Support: Run with NPC party members (level synced)\n\ufffd Unsync (Solo): Run alone at your current level (unsynced)\n\ufffd Unsync (Party): Run with your party at current level (unsynced)\n\nYou can override this setting for individual duties below."); + } + ImGui.Separator(); + using (ImRaii.Disabled(!v)) + { + ImGui.Text("Questionable includes a default list of duties that work if AutoDuty and BossMod are installed."); + ImGui.Text("The included list of duties can change with each update, and is based on the following spreadsheet:"); + if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.GlobeEurope, "Open AutoDuty spreadsheet")) { - ((IDisposable)val2)?.Dispose(); + Util.OpenLink("https://docs.google.com/spreadsheets/d/151RlpqRcCpiD_VbQn6Duf-u-S71EP7d0mx3j1PDNoNA/edit?pli=1#gid=0"); } ImGui.Separator(); - val2 = ImRaii.Disabled(!v); - try + ImGui.Text("You can override the settings for each individual duty:"); + using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("DutyTypeTabs"); + if ((bool)tabBarDisposable) { - ImGui.Text("Questionable includes a default list of duties that work if AutoDuty and BossMod are installed."); - ImGui.Text("The included list of duties can change with each update, and is based on the following spreadsheet:"); - if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.GlobeEurope, "Open AutoDuty spreadsheet")) + using (ImRaii.TabItemDisposable tabItemDisposable2 = ImRaii.TabItem("Dungeons")) { - Util.OpenLink("https://docs.google.com/spreadsheets/d/151RlpqRcCpiD_VbQn6Duf-u-S71EP7d0mx3j1PDNoNA/edit?pli=1#gid=0"); - } - ImGui.Separator(); - ImGui.Text("You can override the settings for each individual duty:"); - TabBarDisposable val5 = ImRaii.TabBar((ImU8String)"DutyTypeTabs"); - try - { - if (TabBarDisposable.op_Implicit(val5)) + if ((bool)tabItemDisposable2) { - TabItemDisposable val6 = ImRaii.TabItem((ImU8String)"Dungeons"); - try - { - if (TabItemDisposable.op_Implicit(val6)) - { - DrawConfigTable(v, _contentFinderConditionNames); - } - } - finally - { - ((TabItemDisposable)(ref val6)).Dispose(); - } - TabItemDisposable val7 = ImRaii.TabItem((ImU8String)"Trials"); - try - { - if (TabItemDisposable.op_Implicit(val7)) - { - DrawConfigTable(v, _allTrialNames); - } - } - finally - { - ((TabItemDisposable)(ref val7)).Dispose(); - } - TabItemDisposable val8 = ImRaii.TabItem((ImU8String)"Normal Raids"); - try - { - if (TabItemDisposable.op_Implicit(val8)) - { - DrawConfigTable(v, _allNormalRaidNames); - } - } - finally - { - ((TabItemDisposable)(ref val8)).Dispose(); - } - TabItemDisposable val9 = ImRaii.TabItem((ImU8String)"Alliance Raids"); - try - { - if (TabItemDisposable.op_Implicit(val9)) - { - DrawConfigTable(v, _allAllianceRaidNames); - } - } - finally - { - ((TabItemDisposable)(ref val9)).Dispose(); - } + DrawConfigTable(v, _contentFinderConditionNames); } - DrawEnableAllButton(); - ImGui.SameLine(); - DrawClipboardButtons(); - ImGui.SameLine(); - DrawResetButton(); } - finally + using (ImRaii.TabItemDisposable tabItemDisposable3 = ImRaii.TabItem("Trials")) { - ((TabBarDisposable)(ref val5)).Dispose(); + if ((bool)tabItemDisposable3) + { + DrawConfigTable(v, _allTrialNames); + } + } + using (ImRaii.TabItemDisposable tabItemDisposable4 = ImRaii.TabItem("Normal Raids")) + { + if ((bool)tabItemDisposable4) + { + DrawConfigTable(v, _allNormalRaidNames); + } + } + using ImRaii.TabItemDisposable tabItemDisposable5 = ImRaii.TabItem("Alliance Raids"); + if ((bool)tabItemDisposable5) + { + DrawConfigTable(v, _allAllianceRaidNames); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); + DrawEnableAllButton(); + ImGui.SameLine(); + DrawClipboardButtons(); + ImGui.SameLine(); + DrawResetButton(); } } private void DrawConfigTable(bool runInstancedContentWithAutoDuty, Dictionary> contentByExpansion) { - //IL_001a: Unknown result type (might be due to invalid IL or missing references) - //IL_001f: Unknown result type (might be due to invalid IL or missing references) - //IL_0020: Unknown result type (might be due to invalid IL or missing references) - //IL_014f: Unknown result type (might be due to invalid IL or missing references) - //IL_0154: Unknown result type (might be due to invalid IL or missing references) - //IL_0156: Unknown result type (might be due to invalid IL or missing references) - //IL_02bc: Unknown result type (might be due to invalid IL or missing references) - //IL_02c1: Unknown result type (might be due to invalid IL or missing references) - ChildDisposable val = ImRaii.Child((ImU8String)"DutyConfiguration", new Vector2(725f, 400f), true); - try + using ImRaii.ChildDisposable childDisposable = ImRaii.Child("DutyConfiguration", new Vector2(725f, 400f), border: true); + if (!childDisposable) { - if (!val) + return; + } + EExpansionVersion[] values = Enum.GetValues(); + for (int i = 0; i < values.Length; i++) + { + EExpansionVersion eExpansionVersion = values[i]; + (int enabledCount, int totalCount) dutyCountsForExpansion = GetDutyCountsForExpansion(eExpansionVersion, contentByExpansion); + int item = dutyCountsForExpansion.enabledCount; + int item2 = dutyCountsForExpansion.totalCount; + string obj = ((item2 > 0) ? $"{eExpansionVersion.ToFriendlyString()} ({item}/{item2})" : eExpansionVersion.ToFriendlyString()); + string key = eExpansionVersion.ToString(); + ImGui.SetNextItemOpen(base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj)) { - return; - } - EExpansionVersion[] values = Enum.GetValues(); - for (int i = 0; i < values.Length; i++) - { - EExpansionVersion eExpansionVersion = values[i]; - (int enabledCount, int totalCount) dutyCountsForExpansion = GetDutyCountsForExpansion(eExpansionVersion, contentByExpansion); - int item = dutyCountsForExpansion.enabledCount; - int item2 = dutyCountsForExpansion.totalCount; - string obj = ((item2 > 0) ? $"{eExpansionVersion.ToFriendlyString()} ({item}/{item2})" : eExpansionVersion.ToFriendlyString()); - string key = eExpansionVersion.ToString(); - ImGui.SetNextItemOpen(base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj)) + if (!base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false)) { - if (!base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false)) + base.Configuration.Duties.ExpansionHeaderStates[key] = true; + Save(); + } + ImU8String table = new ImU8String(6, 1); + table.AppendLiteral("Duties"); + table.AppendFormatted(eExpansionVersion); + using ImRaii.TableDisposable tableDisposable = ImRaii.Table(table, 3, ImGuiTableFlags.SizingFixedFit); + if (!(bool)tableDisposable) + { + continue; + } + ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Enabled", ImGuiTableColumnFlags.WidthFixed, 200f); + ImGui.TableSetupColumn("Mode", ImGuiTableColumnFlags.WidthFixed, 150f); + if (!contentByExpansion.TryGetValue(eExpansionVersion, out List value)) + { + continue; + } + foreach (DutyInfo item3 in value) + { + item3.Deconstruct(out uint CfcId, out uint TerritoryId, out string Name); + uint num = CfcId; + uint value2 = TerritoryId; + string text = Name; + DutyOptions dutyOptions; + bool flag = _questRegistry.TryGetDutyByContentFinderConditionId(num, out dutyOptions); + ImGui.TableNextRow(); + string[] array; + int currentItem; + if (flag) { - base.Configuration.Duties.ExpansionHeaderStates[key] = true; - Save(); + array = (dutyOptions.Enabled ? SupportedCfcOptions : UnsupportedCfcOptions); + currentItem = 0; + if (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num)) + { + currentItem = 1; + } + if (base.Configuration.Duties.BlacklistedDutyCfcIds.Contains(num)) + { + currentItem = 2; + } } - ImU8String imU8String = new ImU8String(6, 1); - imU8String.AppendLiteral("Duties"); - imU8String.AppendFormatted(eExpansionVersion); - TableDisposable val2 = ImRaii.Table(imU8String, 3, ImGuiTableFlags.SizingFixedFit); - try + else { - if (!TableDisposable.op_Implicit(val2)) + array = new string[2] { "Disabled", "Enabled" }; + currentItem = (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num) ? 1 : 0); + } + if (ImGui.TableNextColumn()) + { + ImGui.AlignTextToFramePadding(); + ImGui.TextUnformatted(text); + if (ImGui.IsItemHovered() && base.Configuration.Advanced.AdditionalStatusInformation) { - continue; - } - ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthStretch); - ImGui.TableSetupColumn("Enabled", ImGuiTableColumnFlags.WidthFixed, 200f); - ImGui.TableSetupColumn("Mode", ImGuiTableColumnFlags.WidthFixed, 150f); - if (!contentByExpansion.TryGetValue(eExpansionVersion, out List value)) - { - continue; - } - foreach (DutyInfo item3 in value) - { - item3.Deconstruct(out uint CfcId, out uint TerritoryId, out string Name); - uint num = CfcId; - uint value2 = TerritoryId; - string text = Name; - DutyOptions dutyOptions; - bool flag = _questRegistry.TryGetDutyByContentFinderConditionId(num, out dutyOptions); - ImGui.TableNextRow(); - string[] array; - int currentItem; - if (flag) + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (tooltipDisposable.Alive) { - array = (dutyOptions.Enabled ? SupportedCfcOptions : UnsupportedCfcOptions); - currentItem = 0; - if (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num)) + ImGui.TextUnformatted(text); + ImGui.Separator(); + ImU8String text2 = new ImU8String(13, 1); + text2.AppendLiteral("TerritoryId: "); + text2.AppendFormatted(value2); + ImGui.BulletText(text2); + ImU8String text3 = new ImU8String(26, 1); + text3.AppendLiteral("ContentFinderConditionId: "); + text3.AppendFormatted(num); + ImGui.BulletText(text3); + if (flag) { - currentItem = 1; + ImGui.BulletText("Duty Support: Available"); } - if (base.Configuration.Duties.BlacklistedDutyCfcIds.Contains(num)) + } + } + if (runInstancedContentWithAutoDuty && !_autoDutyIpc.HasPath(num)) + { + ImGuiComponents.HelpMarker("This duty is not supported by AutoDuty", FontAwesomeIcon.Times, ImGuiColors.DalamudRed); + } + else if (flag && dutyOptions.Notes.Count > 0) + { + ConfigComponent.DrawNotes(dutyOptions.Enabled, dutyOptions.Notes); + } + } + if (ImGui.TableNextColumn()) + { + ImU8String id = new ImU8String(16, 1); + id.AppendLiteral("##DungeonEnabled"); + id.AppendFormatted(num); + using (ImRaii.PushId(id)) + { + ImGui.SetNextItemWidth(200f); + if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan)array, array.Length)) + { + base.Configuration.Duties.WhitelistedDutyCfcIds.Remove(num); + base.Configuration.Duties.BlacklistedDutyCfcIds.Remove(num); + if (flag) { - currentItem = 2; + switch (currentItem) + { + case 1: + base.Configuration.Duties.WhitelistedDutyCfcIds.Add(num); + break; + case 2: + base.Configuration.Duties.BlacklistedDutyCfcIds.Add(num); + break; + } } + else if (currentItem == 1) + { + base.Configuration.Duties.WhitelistedDutyCfcIds.Add(num); + } + Save(); + } + } + } + if (!ImGui.TableNextColumn()) + { + continue; + } + ImU8String id2 = new ImU8String(13, 1); + id2.AppendLiteral("##DungeonMode"); + id2.AppendFormatted(num); + using (ImRaii.PushId(id2)) + { + EDutyMode value3; + bool flag2 = base.Configuration.Duties.DutyModeOverrides.TryGetValue(num, out value3); + EDutyMode num2 = (flag2 ? value3 : ((EDutyMode)(-1))); + Name = "Use Default"; + string[] dutyModeLabels = DutyModeLabels; + int num3 = 0; + string[] array2 = new string[1 + dutyModeLabels.Length]; + array2[num3] = Name; + num3++; + ReadOnlySpan readOnlySpan = new ReadOnlySpan(dutyModeLabels); + readOnlySpan.CopyTo(new Span(array2).Slice(num3, readOnlySpan.Length)); + num3 += readOnlySpan.Length; + string[] array3 = array2; + int currentItem2 = (int)(num2 + 1); + ImGui.SetNextItemWidth(150f); + if (ImGui.Combo((ImU8String)string.Empty, ref currentItem2, (ReadOnlySpan)array3, array3.Length)) + { + if (currentItem2 == 0) + { + base.Configuration.Duties.DutyModeOverrides.Remove(num); } else { - array = new string[2] { "Disabled", "Enabled" }; - currentItem = (base.Configuration.Duties.WhitelistedDutyCfcIds.Contains(num) ? 1 : 0); - } - if (ImGui.TableNextColumn()) - { - ImGui.AlignTextToFramePadding(); - ImGui.TextUnformatted(text); - if (ImGui.IsItemHovered() && base.Configuration.Advanced.AdditionalStatusInformation) - { - TooltipDisposable val3 = ImRaii.Tooltip(); - try - { - if (((TooltipDisposable)(ref val3)).Alive) - { - ImGui.TextUnformatted(text); - ImGui.Separator(); - ImU8String text2 = new ImU8String(13, 1); - text2.AppendLiteral("TerritoryId: "); - text2.AppendFormatted(value2); - ImGui.BulletText(text2); - ImU8String text3 = new ImU8String(26, 1); - text3.AppendLiteral("ContentFinderConditionId: "); - text3.AppendFormatted(num); - ImGui.BulletText(text3); - if (flag) - { - ImGui.BulletText("Duty Support: Available"); - } - } - } - finally - { - ((TooltipDisposable)(ref val3)).Dispose(); - } - } - if (runInstancedContentWithAutoDuty && !_autoDutyIpc.HasPath(num)) - { - ImGuiComponents.HelpMarker("This duty is not supported by AutoDuty", FontAwesomeIcon.Times, (Vector4?)ImGuiColors.DalamudRed); - } - else if (flag && dutyOptions.Notes.Count > 0) - { - ConfigComponent.DrawNotes(dutyOptions.Enabled, dutyOptions.Notes); - } - } - if (ImGui.TableNextColumn()) - { - ImU8String imU8String2 = new ImU8String(16, 1); - imU8String2.AppendLiteral("##DungeonEnabled"); - imU8String2.AppendFormatted(num); - IdDisposable val4 = ImRaii.PushId(imU8String2, true); - try - { - ImGui.SetNextItemWidth(200f); - if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan)array, array.Length)) - { - base.Configuration.Duties.WhitelistedDutyCfcIds.Remove(num); - base.Configuration.Duties.BlacklistedDutyCfcIds.Remove(num); - if (flag) - { - switch (currentItem) - { - case 1: - base.Configuration.Duties.WhitelistedDutyCfcIds.Add(num); - break; - case 2: - base.Configuration.Duties.BlacklistedDutyCfcIds.Add(num); - break; - } - } - else if (currentItem == 1) - { - base.Configuration.Duties.WhitelistedDutyCfcIds.Add(num); - } - Save(); - } - } - finally - { - ((IDisposable)val4)?.Dispose(); - } - } - if (!ImGui.TableNextColumn()) - { - continue; - } - ImU8String imU8String3 = new ImU8String(13, 1); - imU8String3.AppendLiteral("##DungeonMode"); - imU8String3.AppendFormatted(num); - IdDisposable val5 = ImRaii.PushId(imU8String3, true); - try - { - EDutyMode value3; - bool flag2 = base.Configuration.Duties.DutyModeOverrides.TryGetValue(num, out value3); - EDutyMode num2 = (flag2 ? value3 : ((EDutyMode)(-1))); - Name = "Use Default"; - string[] dutyModeLabels = DutyModeLabels; - int num3 = 0; - string[] array2 = new string[1 + dutyModeLabels.Length]; - array2[num3] = Name; - num3++; - ReadOnlySpan readOnlySpan = new ReadOnlySpan(dutyModeLabels); - readOnlySpan.CopyTo(new Span(array2).Slice(num3, readOnlySpan.Length)); - num3 += readOnlySpan.Length; - string[] array3 = array2; - int currentItem2 = (int)(num2 + 1); - ImGui.SetNextItemWidth(150f); - if (ImGui.Combo((ImU8String)string.Empty, ref currentItem2, (ReadOnlySpan)array3, array3.Length)) - { - if (currentItem2 == 0) - { - base.Configuration.Duties.DutyModeOverrides.Remove(num); - } - else - { - base.Configuration.Duties.DutyModeOverrides[num] = (EDutyMode)(currentItem2 - 1); - } - Save(); - } - if (ImGui.IsItemHovered()) - { - EDutyMode eDutyMode = (flag2 ? value3 : base.Configuration.Duties.DefaultDutyMode); - ImGui.SetTooltip(flag2 ? ("Override: " + DutyModeLabels[(int)eDutyMode]) : ("Using default: " + DutyModeLabels[(int)eDutyMode])); - } - } - finally - { - ((IDisposable)val5)?.Dispose(); + base.Configuration.Duties.DutyModeOverrides[num] = (EDutyMode)(currentItem2 - 1); } + Save(); + } + if (ImGui.IsItemHovered()) + { + EDutyMode eDutyMode = (flag2 ? value3 : base.Configuration.Duties.DefaultDutyMode); + ImGui.SetTooltip(flag2 ? ("Override: " + DutyModeLabels[(int)eDutyMode]) : ("Using default: " + DutyModeLabels[(int)eDutyMode])); } } - finally - { - ((TableDisposable)(ref val2)).Dispose(); - } - } - else if (base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.Duties.ExpansionHeaderStates[key] = false; - Save(); } } - } - finally - { - ((ChildDisposable)(ref val)).Dispose(); + else if (base.Configuration.Duties.ExpansionHeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.Duties.ExpansionHeaderStates[key] = false; + Save(); + } } } @@ -554,8 +441,7 @@ internal sealed class DutyConfigComponent : ConfigComponent private void DrawClipboardButtons() { - DisabledDisposable val = ImRaii.Disabled(base.Configuration.Duties.WhitelistedDutyCfcIds.Count + base.Configuration.Duties.BlacklistedDutyCfcIds.Count + base.Configuration.Duties.DutyModeOverrides.Count == 0); - try + using (ImRaii.Disabled(base.Configuration.Duties.WhitelistedDutyCfcIds.Count + base.Configuration.Duties.BlacklistedDutyCfcIds.Count + base.Configuration.Duties.DutyModeOverrides.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Copy, "Export to clipboard")) { @@ -565,14 +451,9 @@ internal sealed class DutyConfigComponent : ConfigComponent ImGui.SetClipboardText("qst:duty:" + Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(";", first.Concat(second).Concat(second2))))); } } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); string text = ImGui.GetClipboardText().Trim(); - val = ImRaii.Disabled(string.IsNullOrEmpty(text) || !text.StartsWith("qst:duty:", StringComparison.InvariantCulture)); - try + using (ImRaii.Disabled(string.IsNullOrEmpty(text) || !text.StartsWith("qst:duty:", StringComparison.InvariantCulture))) { if (!ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Paste, "Import from Clipboard")) { @@ -611,16 +492,11 @@ internal sealed class DutyConfigComponent : ConfigComponent } Save(); } - finally - { - ((IDisposable)val)?.Dispose(); - } } private void DrawResetButton() { - DisabledDisposable val = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Undo, "Reset to default")) { @@ -631,10 +507,6 @@ internal sealed class DutyConfigComponent : ConfigComponent Save(); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Hold CTRL to enable this button."); diff --git a/Questionable/Questionable.Windows.ConfigComponents/GeneralConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/GeneralConfigComponent.cs index 0388a23..5cf232b 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/GeneralConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/GeneralConfigComponent.cs @@ -95,532 +95,383 @@ internal sealed class GeneralConfigComponent : ConfigComponent public override void DrawTab() { - //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_0147: Unknown result type (might be due to invalid IL or missing references) - //IL_014c: Unknown result type (might be due to invalid IL or missing references) - //IL_014e: Unknown result type (might be due to invalid IL or missing references) - //IL_02fc: Unknown result type (might be due to invalid IL or missing references) - //IL_0301: Unknown result type (might be due to invalid IL or missing references) - //IL_042d: Unknown result type (might be due to invalid IL or missing references) - //IL_0432: Unknown result type (might be due to invalid IL or missing references) - //IL_0434: Unknown result type (might be due to invalid IL or missing references) - //IL_0737: Unknown result type (might be due to invalid IL or missing references) - //IL_073c: Unknown result type (might be due to invalid IL or missing references) - //IL_07de: Unknown result type (might be due to invalid IL or missing references) - //IL_07e3: Unknown result type (might be due to invalid IL or missing references) - //IL_0885: Unknown result type (might be due to invalid IL or missing references) - //IL_088a: Unknown result type (might be due to invalid IL or missing references) - //IL_09ac: Unknown result type (might be due to invalid IL or missing references) - //IL_09b1: Unknown result type (might be due to invalid IL or missing references) - //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) - //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) - //IL_0c5e: Unknown result type (might be due to invalid IL or missing references) - //IL_0c63: Unknown result type (might be due to invalid IL or missing references) - //IL_0d05: Unknown result type (might be due to invalid IL or missing references) - //IL_0d0a: Unknown result type (might be due to invalid IL or missing references) - //IL_0dac: Unknown result type (might be due to invalid IL or missing references) - //IL_0db1: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"General###General"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("General###General"); + if (!tabItemDisposable) { - if (!val) + return; + } + int currentItem = (int)base.Configuration.General.CombatModule; + if (ImGui.Combo((ImU8String)"Preferred Combat Module", ref currentItem, (ReadOnlySpan)_combatModuleNames, _combatModuleNames.Length)) + { + base.Configuration.General.CombatModule = (Configuration.ECombatModule)currentItem; + Save(); + } + int num = Array.FindIndex(_mountIds, (uint x) => x == base.Configuration.General.MountId); + if (num == -1) + { + num = 0; + base.Configuration.General.MountId = _mountIds[num]; + Save(); + } + string text = ((num >= 0 && num < _mountNames.Length) ? _mountNames[num] : "Unknown"); + if (ImGui.BeginCombo("Preferred Mount", text, ImGuiComboFlags.HeightLarge)) + { + if (!_mountComboJustOpened) { - return; + ImGui.SetKeyboardFocusHere(); + _mountComboJustOpened = true; } - int currentItem = (int)base.Configuration.General.CombatModule; - if (ImGui.Combo((ImU8String)"Preferred Combat Module", ref currentItem, (ReadOnlySpan)_combatModuleNames, _combatModuleNames.Length)) + ImGui.SetNextItemWidth(-1f); + ImGui.InputTextWithHint("##MountSearch", "Search mounts...", ref _mountSearchText, 256); + ImGui.Separator(); + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("##MountScrollArea", new Vector2(0f, 300f), border: false)) { - base.Configuration.General.CombatModule = (Configuration.ECombatModule)currentItem; - Save(); - } - int num = Array.FindIndex(_mountIds, (uint x) => x == base.Configuration.General.MountId); - if (num == -1) - { - num = 0; - base.Configuration.General.MountId = _mountIds[num]; - Save(); - } - string text = ((num >= 0 && num < _mountNames.Length) ? _mountNames[num] : "Unknown"); - if (ImGui.BeginCombo("Preferred Mount", text, ImGuiComboFlags.HeightLarge)) - { - if (!_mountComboJustOpened) + if ((bool)childDisposable) { - ImGui.SetKeyboardFocusHere(); - _mountComboJustOpened = true; - } - ImGui.SetNextItemWidth(-1f); - ImGui.InputTextWithHint("##MountSearch", "Search mounts...", ref _mountSearchText, 256); - ImGui.Separator(); - ChildDisposable val2 = ImRaii.Child((ImU8String)"##MountScrollArea", new Vector2(0f, 300f), false); - try - { - if (ChildDisposable.op_Implicit(val2)) + string value = _mountSearchText.ToUpperInvariant(); + for (int num2 = 0; num2 < _mountNames.Length; num2++) { - string value = _mountSearchText.ToUpperInvariant(); - for (int num2 = 0; num2 < _mountNames.Length; num2++) + if (string.IsNullOrEmpty(_mountSearchText) || _mountNames[num2].ToUpperInvariant().Contains(value, StringComparison.Ordinal)) { - if (string.IsNullOrEmpty(_mountSearchText) || _mountNames[num2].ToUpperInvariant().Contains(value, StringComparison.Ordinal)) + bool flag = num2 == num; + if (ImGui.Selectable(_mountNames[num2], flag)) { - bool flag = num2 == num; - if (ImGui.Selectable(_mountNames[num2], flag)) - { - base.Configuration.General.MountId = _mountIds[num2]; - Save(); - _mountSearchText = string.Empty; - ImGui.CloseCurrentPopup(); - } - if (flag) - { - ImGui.SetItemDefaultFocus(); - } + base.Configuration.General.MountId = _mountIds[num2]; + Save(); + _mountSearchText = string.Empty; + ImGui.CloseCurrentPopup(); + } + if (flag) + { + ImGui.SetItemDefaultFocus(); } } } } - finally + } + ImGui.EndCombo(); + } + else + { + _mountComboJustOpened = false; + } + int currentItem2 = (int)base.Configuration.General.GrandCompany; + if (ImGui.Combo((ImU8String)"Preferred Grand Company", ref currentItem2, (ReadOnlySpan)_grandCompanyNames, _grandCompanyNames.Length)) + { + base.Configuration.General.GrandCompany = (FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany)currentItem2; + Save(); + } + int currentItem3 = (int)base.Configuration.General.MsqPriority; + if (ImGui.Combo((ImU8String)"MSQ Priority", ref currentItem3, (ReadOnlySpan)_msqPriorityNames, _msqPriorityNames.Length)) + { + base.Configuration.General.MsqPriority = (Configuration.EMsqPriorityMode)currentItem3; + Save(); + } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) + { + ImGui.Text("Controls when the Main Scenario Quest (MSQ) is automatically accepted:"); + ImGui.Spacing(); + ImGui.BulletText("Always: Auto-accept MSQ immediately"); + ImGui.BulletText("After Tracked: Complete accepted quests first, then pick up MSQ"); + ImGui.BulletText("Manual: Never auto-accept MSQ, only do manually accepted quests"); + } + } + int num3 = Array.IndexOf(_classJobIds, base.Configuration.General.CombatJob); + if (num3 == -1) + { + base.Configuration.General.CombatJob = EClassJob.Adventurer; + Save(); + num3 = 0; + } + string text2 = ((num3 >= 0 && num3 < _classJobNames.Length) ? _classJobNames[num3] : "Unknown"); + if (ImGui.BeginCombo("Preferred Combat Job", text2, ImGuiComboFlags.HeightLarge)) + { + if (!_classJobComboJustOpened) + { + ImGui.SetKeyboardFocusHere(); + _classJobComboJustOpened = true; + } + ImGui.SetNextItemWidth(-1f); + ImGui.InputTextWithHint("##CombatJobSearch", "Search combat jobs...", ref _classJobSearchText, 256); + ImGui.Separator(); + using (ImRaii.ChildDisposable childDisposable2 = ImRaii.Child("##CombatJobScrollArea", new Vector2(0f, 300f), border: false)) + { + if ((bool)childDisposable2) { - ((ChildDisposable)(ref val2)).Dispose(); + string value2 = _classJobSearchText.ToUpperInvariant(); + for (int num4 = 0; num4 < _classJobNames.Length; num4++) + { + if (string.IsNullOrEmpty(_classJobSearchText) || _classJobNames[num4].ToUpperInvariant().Contains(value2, StringComparison.Ordinal)) + { + bool flag2 = num4 == num3; + if (ImGui.Selectable(_classJobNames[num4], flag2)) + { + base.Configuration.General.CombatJob = _classJobIds[num4]; + Save(); + _classJobSearchText = string.Empty; + ImGui.CloseCurrentPopup(); + } + if (flag2) + { + ImGui.SetItemDefaultFocus(); + } + } + } } - ImGui.EndCombo(); } - else + ImGui.EndCombo(); + } + else + { + _classJobComboJustOpened = false; + } + ImGui.Separator(); + ImGui.Text("UI"); + using (ImRaii.PushIndent()) + { + bool v = base.Configuration.General.HideInAllInstances; + if (ImGui.Checkbox("Hide quest window in all instanced duties", ref v)) { - _mountComboJustOpened = false; - } - int currentItem2 = (int)base.Configuration.General.GrandCompany; - if (ImGui.Combo((ImU8String)"Preferred Grand Company", ref currentItem2, (ReadOnlySpan)_grandCompanyNames, _grandCompanyNames.Length)) - { - base.Configuration.General.GrandCompany = (FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany)currentItem2; + base.Configuration.General.HideInAllInstances = v; Save(); } - int currentItem3 = (int)base.Configuration.General.MsqPriority; - if (ImGui.Combo((ImU8String)"MSQ Priority", ref currentItem3, (ReadOnlySpan)_msqPriorityNames, _msqPriorityNames.Length)) + bool v2 = base.Configuration.General.UseEscToCancelQuesting; + if (ImGui.Checkbox("Double tap ESC to cancel questing/movement", ref v2)) { - base.Configuration.General.MsqPriority = (Configuration.EMsqPriorityMode)currentItem3; + base.Configuration.General.UseEscToCancelQuesting = v2; + Save(); + } + bool v3 = base.Configuration.General.StopOnPlayerInput; + if (ImGui.Checkbox("Stop automation when manually moving character", ref v3)) + { + base.Configuration.General.StopOnPlayerInput = v3; + Save(); + } + bool v4 = base.Configuration.General.ShowIncompleteSeasonalEvents; + if (ImGui.Checkbox("Show details for incomplete seasonal events", ref v4)) + { + base.Configuration.General.ShowIncompleteSeasonalEvents = v4; + Save(); + } + bool v5 = base.Configuration.General.HideSeasonalEventsFromJournalProgress; + if (ImGui.Checkbox("Hide Seasonal Events from Journal Progress", ref v5)) + { + base.Configuration.General.HideSeasonalEventsFromJournalProgress = v5; + Save(); + } + bool v6 = base.Configuration.General.ShowChangelogOnUpdate; + if (ImGui.Checkbox("Show changelog window when plugin updates", ref v6)) + { + base.Configuration.General.ShowChangelogOnUpdate = v6; + Save(); + } + } + ImGui.Separator(); + ImGui.Text("Questing"); + using (ImRaii.PushIndent()) + { + bool v7 = base.Configuration.General.AutoSolveQte; + if (ImGui.Checkbox("Automatically solve Quick Time Events (QTEs)", ref v7)) + { + base.Configuration.General.AutoSolveQte = v7; Save(); } ImGui.SameLine(); - FontDisposable val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); } - finally + if (ImGui.IsItemHovered()) { - ((IDisposable)val3)?.Dispose(); + using (ImRaii.Tooltip()) + { + ImGui.Text("Automatically mashes the button during Active Time Maneuver (ATM)"); + ImGui.Text("prompts that appear in certain duties and quest battles."); + } + } + bool v8 = base.Configuration.General.AutoSnipe; + if (ImGui.Checkbox("Automatically complete snipe quests", ref v8)) + { + base.Configuration.General.AutoSnipe = v8; + Save(); + } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); } if (ImGui.IsItemHovered()) { - TooltipDisposable val4 = ImRaii.Tooltip(); - try + using (ImRaii.Tooltip()) { - ImGui.Text("Controls when the Main Scenario Quest (MSQ) is automatically accepted:"); - ImGui.Spacing(); - ImGui.BulletText("Always: Auto-accept MSQ immediately"); - ImGui.BulletText("After Tracked: Complete accepted quests first, then pick up MSQ"); - ImGui.BulletText("Manual: Never auto-accept MSQ, only do manually accepted quests"); - } - finally - { - ((TooltipDisposable)(ref val4)).Dispose(); + ImGui.Text("Automatically completes sniping minigames introduced in Stormblood."); + ImGui.Text("When enabled, snipe targets are instantly hit without manual aiming."); } } - int num3 = Array.IndexOf(_classJobIds, base.Configuration.General.CombatJob); - if (num3 == -1) + bool v9 = base.Configuration.General.CinemaMode; + if (ImGui.Checkbox("Cinema Mode (watch cutscenes)", ref v9)) { - base.Configuration.General.CombatJob = EClassJob.Adventurer; + base.Configuration.General.CinemaMode = v9; Save(); - num3 = 0; } - string text2 = ((num3 >= 0 && num3 < _classJobNames.Length) ? _classJobNames[num3] : "Unknown"); - if (ImGui.BeginCombo("Preferred Combat Job", text2, ImGuiComboFlags.HeightLarge)) + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) { - if (!_classJobComboJustOpened) + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) { - ImGui.SetKeyboardFocusHere(); - _classJobComboJustOpened = true; + ImGui.Text("When enabled, cutscenes will NOT be automatically skipped."); + ImGui.Text("This allows you to experience the story while Questionable"); + ImGui.Text("handles navigation, combat, and other gameplay automation."); + ImGui.Spacing(); + ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.7f, 1f), "Recommended for first-time story playthroughs."); } - ImGui.SetNextItemWidth(-1f); - ImGui.InputTextWithHint("##CombatJobSearch", "Search combat jobs...", ref _classJobSearchText, 256); - ImGui.Separator(); - ChildDisposable val5 = ImRaii.Child((ImU8String)"##CombatJobScrollArea", new Vector2(0f, 300f), false); - try + } + bool v10 = base.Configuration.General.ConfigureTextAdvance; + if (ImGui.Checkbox("Automatically configure TextAdvance with the recommended settings", ref v10)) + { + base.Configuration.General.ConfigureTextAdvance = v10; + Save(); + } + bool v11 = base.Configuration.General.SkipLowPriorityDuties; + if (ImGui.Checkbox("Unlock certain optional dungeons and raids (instead of waiting for completion)", ref v11)) + { + base.Configuration.General.SkipLowPriorityDuties = v11; + Save(); + } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) { - if (ChildDisposable.op_Implicit(val5)) + ImGui.Text("Questionable automatically picks up some optional quests (e.g. for aether currents, or the ARR alliance raids)."); + ImGui.Text("If this setting is enabled, Questionable will continue with other quests, instead of waiting for manual completion of the duty."); + ImGui.Separator(); + ImGui.Text("This affects the following dungeons and raids:"); + foreach (var lowPriorityContentFinderConditionQuest in _questRegistry.LowPriorityContentFinderConditionQuests) { - string value2 = _classJobSearchText.ToUpperInvariant(); - for (int num4 = 0; num4 < _classJobNames.Length; num4++) + if (_territoryData.TryGetContentFinderCondition(lowPriorityContentFinderConditionQuest.ContentFinderConditionId, out TerritoryData.ContentFinderConditionData contentFinderConditionData)) { - if (string.IsNullOrEmpty(_classJobSearchText) || _classJobNames[num4].ToUpperInvariant().Contains(value2, StringComparison.Ordinal)) - { - bool flag2 = num4 == num3; - if (ImGui.Selectable(_classJobNames[num4], flag2)) - { - base.Configuration.General.CombatJob = _classJobIds[num4]; - Save(); - _classJobSearchText = string.Empty; - ImGui.CloseCurrentPopup(); - } - if (flag2) - { - ImGui.SetItemDefaultFocus(); - } - } + ImU8String text3 = new ImU8String(0, 1); + text3.AppendFormatted(contentFinderConditionData.Name); + ImGui.BulletText(text3); } } } - finally - { - ((ChildDisposable)(ref val5)).Dispose(); - } - ImGui.EndCombo(); } - else + ImGui.Spacing(); + bool v12 = base.Configuration.General.AutoStepRefreshEnabled; + if (ImGui.Checkbox("Automatically refresh quest steps when stuck", ref v12)) { - _classJobComboJustOpened = false; + base.Configuration.General.AutoStepRefreshEnabled = v12; + Save(); } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) + { + ImGui.Text("Questionable will automatically refresh a quest step if it appears to be stuck after the configured delay."); + ImGui.Text("This helps resume automated quest completion when interruptions occur."); + } + } + using (ImRaii.Disabled(!v12)) + { + ImGui.Indent(); + int v13 = base.Configuration.General.AutoStepRefreshDelaySeconds; + ImGui.SetNextItemWidth(150f); + if (ImGui.SliderInt("Refresh delay (seconds)", ref v13, 10, 180)) + { + base.Configuration.General.AutoStepRefreshDelaySeconds = v13; + Save(); + } + Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f); + ImU8String text4 = new ImU8String(77, 1); + text4.AppendLiteral("Quest steps will refresh automatically after "); + text4.AppendFormatted(v13); + text4.AppendLiteral(" seconds if no progress is made."); + ImGui.TextColored(in col, text4); + ImGui.Unindent(); + } + ImGui.Spacing(); ImGui.Separator(); - ImGui.Text("UI"); - IndentDisposable val6 = ImRaii.PushIndent(1, true); - try + ImGui.Text("Priority Quest Management"); + bool v14 = base.Configuration.General.PersistPriorityQuestsBetweenSessions; + if (ImGui.Checkbox("Save priority quests between sessions", ref v14)) { - bool v = base.Configuration.General.HideInAllInstances; - if (ImGui.Checkbox("Hide quest window in all instanced duties", ref v)) + base.Configuration.General.PersistPriorityQuestsBetweenSessions = v14; + Save(); + } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) { - base.Configuration.General.HideInAllInstances = v; - Save(); - } - bool v2 = base.Configuration.General.UseEscToCancelQuesting; - if (ImGui.Checkbox("Double tap ESC to cancel questing/movement", ref v2)) - { - base.Configuration.General.UseEscToCancelQuesting = v2; - Save(); - } - bool v3 = base.Configuration.General.StopOnPlayerInput; - if (ImGui.Checkbox("Stop automation when manually moving character", ref v3)) - { - base.Configuration.General.StopOnPlayerInput = v3; - Save(); - } - bool v4 = base.Configuration.General.ShowIncompleteSeasonalEvents; - if (ImGui.Checkbox("Show details for incomplete seasonal events", ref v4)) - { - base.Configuration.General.ShowIncompleteSeasonalEvents = v4; - Save(); - } - bool v5 = base.Configuration.General.HideSeasonalEventsFromJournalProgress; - if (ImGui.Checkbox("Hide Seasonal Events from Journal Progress", ref v5)) - { - base.Configuration.General.HideSeasonalEventsFromJournalProgress = v5; - Save(); - } - bool v6 = base.Configuration.General.ShowChangelogOnUpdate; - if (ImGui.Checkbox("Show changelog window when plugin updates", ref v6)) - { - base.Configuration.General.ShowChangelogOnUpdate = v6; - Save(); + ImGui.Text("When enabled, your priority quest list will be saved and restored"); + ImGui.Text("when the plugin reloads or the game restarts."); } } - finally + bool v15 = base.Configuration.General.ClearPriorityQuestsOnLogout; + if (ImGui.Checkbox("Clear priority quests on character logout", ref v15)) { - ((IDisposable)val6)?.Dispose(); + base.Configuration.General.ClearPriorityQuestsOnLogout = v15; + Save(); } - ImGui.Separator(); - ImGui.Text("Questing"); - val6 = ImRaii.PushIndent(1, true); - try + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) { - bool v7 = base.Configuration.General.AutoSolveQte; - if (ImGui.Checkbox("Automatically solve Quick Time Events (QTEs)", ref v7)) + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) { - base.Configuration.General.AutoSolveQte = v7; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val7 = ImRaii.Tooltip(); - try - { - ImGui.Text("Automatically mashes the button during Active Time Maneuver (ATM)"); - ImGui.Text("prompts that appear in certain duties and quest battles."); - } - finally - { - ((TooltipDisposable)(ref val7)).Dispose(); - } - } - bool v8 = base.Configuration.General.AutoSnipe; - if (ImGui.Checkbox("Automatically complete snipe quests", ref v8)) - { - base.Configuration.General.AutoSnipe = v8; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val8 = ImRaii.Tooltip(); - try - { - ImGui.Text("Automatically completes sniping minigames introduced in Stormblood."); - ImGui.Text("When enabled, snipe targets are instantly hit without manual aiming."); - } - finally - { - ((TooltipDisposable)(ref val8)).Dispose(); - } - } - bool v9 = base.Configuration.General.CinemaMode; - if (ImGui.Checkbox("Cinema Mode (watch cutscenes)", ref v9)) - { - base.Configuration.General.CinemaMode = v9; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val9 = ImRaii.Tooltip(); - try - { - ImGui.Text("When enabled, cutscenes will NOT be automatically skipped."); - ImGui.Text("This allows you to experience the story while Questionable"); - ImGui.Text("handles navigation, combat, and other gameplay automation."); - ImGui.Spacing(); - ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.7f, 1f), "Recommended for first-time story playthroughs."); - } - finally - { - ((TooltipDisposable)(ref val9)).Dispose(); - } - } - bool v10 = base.Configuration.General.ConfigureTextAdvance; - if (ImGui.Checkbox("Automatically configure TextAdvance with the recommended settings", ref v10)) - { - base.Configuration.General.ConfigureTextAdvance = v10; - Save(); - } - bool v11 = base.Configuration.General.SkipLowPriorityDuties; - if (ImGui.Checkbox("Unlock certain optional dungeons and raids (instead of waiting for completion)", ref v11)) - { - base.Configuration.General.SkipLowPriorityDuties = v11; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val10 = ImRaii.Tooltip(); - try - { - ImGui.Text("Questionable automatically picks up some optional quests (e.g. for aether currents, or the ARR alliance raids)."); - ImGui.Text("If this setting is enabled, Questionable will continue with other quests, instead of waiting for manual completion of the duty."); - ImGui.Separator(); - ImGui.Text("This affects the following dungeons and raids:"); - foreach (var lowPriorityContentFinderConditionQuest in _questRegistry.LowPriorityContentFinderConditionQuests) - { - if (_territoryData.TryGetContentFinderCondition(lowPriorityContentFinderConditionQuest.ContentFinderConditionId, out TerritoryData.ContentFinderConditionData contentFinderConditionData)) - { - ImU8String text3 = new ImU8String(0, 1); - text3.AppendFormatted(contentFinderConditionData.Name); - ImGui.BulletText(text3); - } - } - } - finally - { - ((TooltipDisposable)(ref val10)).Dispose(); - } - } - ImGui.Spacing(); - bool v12 = base.Configuration.General.AutoStepRefreshEnabled; - if (ImGui.Checkbox("Automatically refresh quest steps when stuck", ref v12)) - { - base.Configuration.General.AutoStepRefreshEnabled = v12; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val11 = ImRaii.Tooltip(); - try - { - ImGui.Text("Questionable will automatically refresh a quest step if it appears to be stuck after the configured delay."); - ImGui.Text("This helps resume automated quest completion when interruptions occur."); - } - finally - { - ((TooltipDisposable)(ref val11)).Dispose(); - } - } - DisabledDisposable val12 = ImRaii.Disabled(!v12); - try - { - ImGui.Indent(); - int v13 = base.Configuration.General.AutoStepRefreshDelaySeconds; - ImGui.SetNextItemWidth(150f); - if (ImGui.SliderInt("Refresh delay (seconds)", ref v13, 10, 180)) - { - base.Configuration.General.AutoStepRefreshDelaySeconds = v13; - Save(); - } - Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f); - ImU8String text4 = new ImU8String(77, 1); - text4.AppendLiteral("Quest steps will refresh automatically after "); - text4.AppendFormatted(v13); - text4.AppendLiteral(" seconds if no progress is made."); - ImGui.TextColored(in col, text4); - ImGui.Unindent(); - } - finally - { - ((IDisposable)val12)?.Dispose(); - } - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Text("Priority Quest Management"); - bool v14 = base.Configuration.General.PersistPriorityQuestsBetweenSessions; - if (ImGui.Checkbox("Save priority quests between sessions", ref v14)) - { - base.Configuration.General.PersistPriorityQuestsBetweenSessions = v14; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val13 = ImRaii.Tooltip(); - try - { - ImGui.Text("When enabled, your priority quest list will be saved and restored"); - ImGui.Text("when the plugin reloads or the game restarts."); - } - finally - { - ((TooltipDisposable)(ref val13)).Dispose(); - } - } - bool v15 = base.Configuration.General.ClearPriorityQuestsOnLogout; - if (ImGui.Checkbox("Clear priority quests on character logout", ref v15)) - { - base.Configuration.General.ClearPriorityQuestsOnLogout = v15; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val14 = ImRaii.Tooltip(); - try - { - ImGui.Text("Clears the priority queue when your character logs out."); - ImGui.Text("This also clears the saved list if persistence is enabled."); - } - finally - { - ((TooltipDisposable)(ref val14)).Dispose(); - } - } - bool v16 = base.Configuration.General.ClearPriorityQuestsOnCompletion; - if (ImGui.Checkbox("Remove priority quests when completed", ref v16)) - { - base.Configuration.General.ClearPriorityQuestsOnCompletion = v16; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try - { - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered()) - { - TooltipDisposable val15 = ImRaii.Tooltip(); - try - { - ImGui.Text("Automatically removes completed quests from your priority queue."); - ImGui.Text("This helps keep your priority list clean without manual intervention."); - return; - } - finally - { - ((TooltipDisposable)(ref val15)).Dispose(); - } + ImGui.Text("Clears the priority queue when your character logs out."); + ImGui.Text("This also clears the saved list if persistence is enabled."); } } - finally + bool v16 = base.Configuration.General.ClearPriorityQuestsOnCompletion; + if (ImGui.Checkbox("Remove priority quests when completed", ref v16)) { - ((IDisposable)val6)?.Dispose(); + base.Configuration.General.ClearPriorityQuestsOnCompletion = v16; + Save(); + } + ImGui.SameLine(); + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + } + if (ImGui.IsItemHovered()) + { + using (ImRaii.Tooltip()) + { + ImGui.Text("Automatically removes completed quests from your priority queue."); + ImGui.Text("This helps keep your priority list clean without manual intervention."); + return; + } } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } } diff --git a/Questionable/Questionable.Windows.ConfigComponents/NotificationConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/NotificationConfigComponent.cs index 13a5d68..595bee2 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/NotificationConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/NotificationConfigComponent.cs @@ -30,97 +30,69 @@ internal sealed class NotificationConfigComponent : ConfigComponent public override void DrawTab() { - //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_0141: Unknown result type (might be due to invalid IL or missing references) - //IL_0146: Unknown result type (might be due to invalid IL or missing references) - //IL_0148: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Notifications###Notifications"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Notifications###Notifications"); + if (!tabItemDisposable) { - if (!val) + return; + } + bool v = base.Configuration.Notifications.Enabled; + if (ImGui.Checkbox("Enable notifications when manual interaction is required", ref v)) + { + base.Configuration.Notifications.Enabled = v; + Save(); + } + using (ImRaii.Disabled(!base.Configuration.Notifications.Enabled)) + { + using (ImRaii.PushIndent()) { - return; - } - bool v = base.Configuration.Notifications.Enabled; - if (ImGui.Checkbox("Enable notifications when manual interaction is required", ref v)) - { - base.Configuration.Notifications.Enabled = v; - Save(); - } - DisabledDisposable val2 = ImRaii.Disabled(!base.Configuration.Notifications.Enabled); - try - { - IndentDisposable val3 = ImRaii.PushIndent(1, true); - try + int num = Array.IndexOf(_xivChatTypes, base.Configuration.Notifications.ChatType); + if (num == -1) { - int num = Array.IndexOf(_xivChatTypes, base.Configuration.Notifications.ChatType); - if (num == -1) + num = 0; + } + string text = ((num >= 0 && num < _chatTypeNames.Length) ? _chatTypeNames[num] : "Unknown"); + if (ImGui.BeginCombo("Chat channel", text, ImGuiComboFlags.HeightLarge)) + { + if (!_chatChannelComboJustOpened) { - num = 0; + ImGui.SetKeyboardFocusHere(); + _chatChannelComboJustOpened = true; } - string text = ((num >= 0 && num < _chatTypeNames.Length) ? _chatTypeNames[num] : "Unknown"); - if (ImGui.BeginCombo("Chat channel", text, ImGuiComboFlags.HeightLarge)) + ImGui.SetNextItemWidth(-1f); + ImGui.InputTextWithHint("##ChatChannelSearch", "Search chat channels...", ref _chatChannelSearchText, 256); + ImGui.Separator(); + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("##ChatChannelScrollArea", new Vector2(0f, 300f), border: false)) { - if (!_chatChannelComboJustOpened) + if ((bool)childDisposable) { - ImGui.SetKeyboardFocusHere(); - _chatChannelComboJustOpened = true; - } - ImGui.SetNextItemWidth(-1f); - ImGui.InputTextWithHint("##ChatChannelSearch", "Search chat channels...", ref _chatChannelSearchText, 256); - ImGui.Separator(); - ChildDisposable val4 = ImRaii.Child((ImU8String)"##ChatChannelScrollArea", new Vector2(0f, 300f), false); - try - { - if (ChildDisposable.op_Implicit(val4)) + string value = _chatChannelSearchText.ToUpperInvariant(); + for (int i = 0; i < _chatTypeNames.Length; i++) { - string value = _chatChannelSearchText.ToUpperInvariant(); - for (int i = 0; i < _chatTypeNames.Length; i++) + if (string.IsNullOrEmpty(_chatChannelSearchText) || _chatTypeNames[i].ToUpperInvariant().Contains(value, StringComparison.Ordinal)) { - if (string.IsNullOrEmpty(_chatChannelSearchText) || _chatTypeNames[i].ToUpperInvariant().Contains(value, StringComparison.Ordinal)) + bool flag = i == num; + if (ImGui.Selectable(_chatTypeNames[i], flag)) { - bool flag = i == num; - if (ImGui.Selectable(_chatTypeNames[i], flag)) - { - base.Configuration.Notifications.ChatType = _xivChatTypes[i]; - Save(); - _chatChannelSearchText = string.Empty; - ImGui.CloseCurrentPopup(); - } - if (flag) - { - ImGui.SetItemDefaultFocus(); - } + base.Configuration.Notifications.ChatType = _xivChatTypes[i]; + Save(); + _chatChannelSearchText = string.Empty; + ImGui.CloseCurrentPopup(); + } + if (flag) + { + ImGui.SetItemDefaultFocus(); } } } } - finally - { - ((ChildDisposable)(ref val4)).Dispose(); - } - ImGui.EndCombo(); - } - else - { - _chatChannelComboJustOpened = false; } + ImGui.EndCombo(); } - finally + else { - ((IDisposable)val3)?.Dispose(); + _chatChannelComboJustOpened = false; } } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } } } diff --git a/Questionable/Questionable.Windows.ConfigComponents/PluginConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/PluginConfigComponent.cs index ae9fd93..1cd1edd 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/PluginConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/PluginConfigComponent.cs @@ -74,31 +74,21 @@ internal sealed class PluginConfigComponent : ConfigComponent public override void DrawTab() { - //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) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Dependencies###Plugins"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Dependencies###Plugins"); + if (!(!tabItemDisposable)) { - if (!(!val)) + Draw(out var allRequiredInstalled); + ImGui.Spacing(); + ImGui.Separator(); + ImGui.Spacing(); + if (allRequiredInstalled) { - Draw(out var allRequiredInstalled); - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Spacing(); - if (allRequiredInstalled) - { - ImGui.TextColored(ImGuiColors.ParsedGreen, "All required plugins are installed."); - } - else - { - ImGui.TextColored(ImGuiColors.DalamudRed, "Required plugins are missing, Questionable will not work properly."); - } + ImGui.TextColored(ImGuiColors.ParsedGreen, "All required plugins are installed."); + } + else + { + ImGui.TextColored(ImGuiColors.DalamudRed, "Required plugins are missing, Questionable will not work properly."); } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } } @@ -111,27 +101,20 @@ internal sealed class PluginConfigComponent : ConfigComponent } ImGui.Text("Questionable requires the following plugins to work:"); allRequiredInstalled = true; - IndentDisposable val = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { foreach (PluginInfo requiredPlugin in RequiredPlugins) { allRequiredInstalled &= DrawPlugin(requiredPlugin, checklistPadding); } } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.Spacing(); ImGui.Separator(); ImGui.Spacing(); ImGui.Text("Questionable supports multiple rotation/combat plugins, please pick the one\nyou want to use:"); - val = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { - DisabledDisposable val2 = ImRaii.Disabled(_combatController.IsRunning); - try + using (ImRaii.Disabled(_combatController.IsRunning)) { if (ImGui.RadioButton("No rotation/combat plugin (combat must be done manually)", _configuration.General.CombatModule == Questionable.Configuration.ECombatModule.None)) { @@ -142,37 +125,23 @@ internal sealed class PluginConfigComponent : ConfigComponent allRequiredInstalled &= DrawCombatPlugin(Questionable.Configuration.ECombatModule.RotationSolverReborn, checklistPadding); allRequiredInstalled &= DrawCombatPlugin(Questionable.Configuration.ECombatModule.WrathCombo, checklistPadding); } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((IDisposable)val)?.Dispose(); } ImGui.Spacing(); ImGui.Separator(); ImGui.Spacing(); ImGui.Text("The following plugins are recommended, but not required:"); - val = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { foreach (PluginInfo recommendedPlugin in _recommendedPlugins) { DrawPlugin(recommendedPlugin, checklistPadding); } } - finally - { - ((IDisposable)val)?.Dispose(); - } } private bool DrawPlugin(PluginInfo plugin, float checklistPadding) { - IdDisposable val = ImRaii.PushId((ImU8String)("plugin_" + plugin.DisplayName), true); - try + using (ImRaii.PushId("plugin_" + plugin.DisplayName)) { IExposedPlugin exposedPlugin = FindInstalledPlugin(plugin); bool flag = exposedPlugin != null; @@ -185,18 +154,13 @@ internal sealed class PluginConfigComponent : ConfigComponent DrawPluginDetails(plugin, checklistPadding, flag); return flag; } - finally - { - ((IDisposable)val)?.Dispose(); - } } private bool DrawCombatPlugin(Configuration.ECombatModule combatModule, float checklistPadding) { ImGui.Spacing(); PluginInfo pluginInfo = CombatPlugins[combatModule]; - IdDisposable val = ImRaii.PushId((ImU8String)("plugin_" + pluginInfo.DisplayName), true); - try + using (ImRaii.PushId("plugin_" + pluginInfo.DisplayName)) { IExposedPlugin exposedPlugin = FindInstalledPlugin(pluginInfo); bool flag = exposedPlugin != null; @@ -221,16 +185,11 @@ internal sealed class PluginConfigComponent : ConfigComponent DrawPluginDetails(pluginInfo, checklistPadding, flag); return flag || _configuration.General.CombatModule != combatModule; } - finally - { - ((IDisposable)val)?.Dispose(); - } } private void DrawPluginDetails(PluginInfo plugin, float checklistPadding, bool isInstalled) { - IndentDisposable val = ImRaii.PushIndent(checklistPadding, true, true); - try + using (ImRaii.PushIndent(checklistPadding)) { if (!string.IsNullOrEmpty(plugin.Details)) { @@ -246,15 +205,10 @@ internal sealed class PluginConfigComponent : ConfigComponent _uiUtils.ChecklistItem(item.DisplayName, isInstalled && flag2); if (!string.IsNullOrEmpty(item.Details)) { - IndentDisposable val2 = ImRaii.PushIndent(checklistPadding, true, true); - try + using (ImRaii.PushIndent(checklistPadding)) { ImGui.TextUnformatted(item.Details); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } } } @@ -285,10 +239,6 @@ internal sealed class PluginConfigComponent : ConfigComponent ImGuiComponents.HelpMarker("Available on official Dalamud Repository"); } } - finally - { - ((IDisposable)val)?.Dispose(); - } } private IExposedPlugin? FindInstalledPlugin(PluginInfo pluginInfo) diff --git a/Questionable/Questionable.Windows.ConfigComponents/SinglePlayerDutyConfigComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/SinglePlayerDutyConfigComponent.cs index 65ae65a..d95b2e6 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/SinglePlayerDutyConfigComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/SinglePlayerDutyConfigComponent.cs @@ -289,576 +289,431 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent public override void DrawTab() { - //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_0135: Unknown result type (might be due to invalid IL or missing references) - //IL_013a: Unknown result type (might be due to invalid IL or missing references) - //IL_013c: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Quest Battles###QuestBattles"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Quest Battles###QuestBattles"); + if (!tabItemDisposable) { - if (!val) + return; + } + bool v = base.Configuration.SinglePlayerDuties.RunSoloInstancesWithBossMod; + if (ImGui.Checkbox("Run quest battles with BossMod", ref v)) + { + base.Configuration.SinglePlayerDuties.RunSoloInstancesWithBossMod = v; + Save(); + } + using (ImRaii.PushIndent(ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X)) + { + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { - return; - } - bool v = base.Configuration.SinglePlayerDuties.RunSoloInstancesWithBossMod; - if (ImGui.Checkbox("Run quest battles with BossMod", ref v)) - { - base.Configuration.SinglePlayerDuties.RunSoloInstancesWithBossMod = v; - Save(); - } - IndentDisposable val2 = ImRaii.PushIndent(ImGui.GetFrameHeight() + ImGui.GetStyle().ItemInnerSpacing.X, true, true); - try - { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try - { - ImGui.TextUnformatted("Work in Progress:"); - ImGui.BulletText("Will always use BossMod for combat (ignoring the configured combat module)."); - ImGui.BulletText("Only a small subset of quest battles have been tested - most of which are in the MSQ."); - ImGui.BulletText("When retrying a failed battle, it will always start at 'Normal' difficulty."); - ImGui.BulletText("Please don't enable this option when using a BossMod fork (such as Reborn);\nwith the missing combat module configuration, it is unlikely to be compatible."); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); - } - ImGui.Separator(); - DisabledDisposable val4 = ImRaii.Disabled(!v); - try - { - ImGui.Text("Questionable includes a default list of quest battles that work if BossMod is installed."); - ImGui.Text("The included list of quest battles can change with each update."); - ImGui.Separator(); - ImGui.Text("You can override the settings for each individual quest battle:"); - TabBarDisposable val5 = ImRaii.TabBar((ImU8String)"QuestionableConfigTabs"); - try - { - if (TabBarDisposable.op_Implicit(val5)) - { - DrawMainScenarioConfigTable(); - DrawJobQuestConfigTable(); - DrawRoleQuestConfigTable(); - DrawOtherQuestConfigTable(); - } - DrawEnableAllButton(); - ImGui.SameLine(); - DrawClipboardButtons(); - ImGui.SameLine(); - DrawResetButton(); - } - finally - { - ((TabBarDisposable)(ref val5)).Dispose(); - } - } - finally - { - ((IDisposable)val4)?.Dispose(); + ImGui.TextUnformatted("Work in Progress:"); + ImGui.BulletText("Will always use BossMod for combat (ignoring the configured combat module)."); + ImGui.BulletText("Only a small subset of quest battles have been tested - most of which are in the MSQ."); + ImGui.BulletText("When retrying a failed battle, it will always start at 'Normal' difficulty."); + ImGui.BulletText("Please don't enable this option when using a BossMod fork (such as Reborn);\nwith the missing combat module configuration, it is unlikely to be compatible."); } } - finally + ImGui.Separator(); + using (ImRaii.Disabled(!v)) { - ((TabItemDisposable)(ref val)).Dispose(); + ImGui.Text("Questionable includes a default list of quest battles that work if BossMod is installed."); + ImGui.Text("The included list of quest battles can change with each update."); + ImGui.Separator(); + ImGui.Text("You can override the settings for each individual quest battle:"); + using ImRaii.TabBarDisposable tabBarDisposable = ImRaii.TabBar("QuestionableConfigTabs"); + if ((bool)tabBarDisposable) + { + DrawMainScenarioConfigTable(); + DrawJobQuestConfigTable(); + DrawRoleQuestConfigTable(); + DrawOtherQuestConfigTable(); + } + DrawEnableAllButton(); + ImGui.SameLine(); + DrawClipboardButtons(); + ImGui.SameLine(); + DrawResetButton(); } } private void DrawMainScenarioConfigTable() { - //IL_0053: Unknown result type (might be due to invalid IL or missing references) - //IL_0058: 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_0066: Unknown result type (might be due to invalid IL or missing references) - //IL_006b: Unknown result type (might be due to invalid IL or missing references) - //IL_006c: Unknown result type (might be due to invalid IL or missing references) (int enabledCount, int totalCount) mainScenarioQuestCounts = GetMainScenarioQuestCounts(); int item = mainScenarioQuestCounts.enabledCount; int item2 = mainScenarioQuestCounts.totalCount; - ImU8String imU8String = new ImU8String(30, 2); - imU8String.AppendLiteral("Main Scenario Quests ("); - imU8String.AppendFormatted(item); - imU8String.AppendLiteral("/"); - imU8String.AppendFormatted(item2); - imU8String.AppendLiteral(")###MSQ"); - TabItemDisposable val = ImRaii.TabItem(imU8String); - try + ImU8String label = new ImU8String(30, 2); + label.AppendLiteral("Main Scenario Quests ("); + label.AppendFormatted(item); + label.AppendLiteral("/"); + label.AppendFormatted(item2); + label.AppendLiteral(")###MSQ"); + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem(label); + if (!tabItemDisposable) { - if (!val) - { - return; - } - ChildDisposable val2 = BeginChildArea(); - try - { - if (!val2) - { - return; - } - (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Limsa]); - int item3 = questBattleCounts.enabledCount; - int item4 = questBattleCounts.totalCount; - string obj = $"Limsa Lominsa ({ConfigComponent.FormatLevel(5)} - {ConfigComponent.FormatLevel(14)}) ({item3}/{item4})"; - string key = "Limsa"; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; - Save(); - } - DrawQuestTable("LimsaLominsa", _startingCityBattles[EAetheryteLocation.Limsa]); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; - Save(); - } - (int enabledCount, int totalCount) questBattleCounts2 = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Gridania]); - int item5 = questBattleCounts2.enabledCount; - int item6 = questBattleCounts2.totalCount; - string obj2 = $"Gridania ({ConfigComponent.FormatLevel(5)} - {ConfigComponent.FormatLevel(14)}) ({item5}/{item6})"; - string key2 = "Gridania"; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj2)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key2] = true; - Save(); - } - DrawQuestTable("Gridania", _startingCityBattles[EAetheryteLocation.Gridania]); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key2] = false; - Save(); - } - (int enabledCount, int totalCount) questBattleCounts3 = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Uldah]); - int item7 = questBattleCounts3.enabledCount; - int item8 = questBattleCounts3.totalCount; - string obj3 = $"Ul'dah ({ConfigComponent.FormatLevel(4)} - {ConfigComponent.FormatLevel(14)}) ({item7}/{item8})"; - string key3 = "Uldah"; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj3)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key3] = true; - Save(); - } - DrawQuestTable("Uldah", _startingCityBattles[EAetheryteLocation.Uldah]); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key3] = false; - Save(); - } - EExpansionVersion[] values = Enum.GetValues(); - for (int i = 0; i < values.Length; i++) - { - EExpansionVersion eExpansionVersion = values[i]; - if (!_mainScenarioBattles.TryGetValue(eExpansionVersion, out List value)) - { - continue; - } - (int enabledCount, int totalCount) questBattleCounts4 = GetQuestBattleCounts(value); - int item9 = questBattleCounts4.enabledCount; - int item10 = questBattleCounts4.totalCount; - string obj4 = $"{eExpansionVersion.ToFriendlyString()} ({item9}/{item10})"; - string key4 = eExpansionVersion.ToString(); - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj4)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key4] = true; - Save(); - } - DrawQuestTable($"Duties{eExpansionVersion}", value); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key4] = false; - Save(); - } - } - } - finally - { - ((ChildDisposable)(ref val2)).Dispose(); - } + return; } - finally + using ImRaii.ChildDisposable childDisposable = BeginChildArea(); + if (!childDisposable) { - ((TabItemDisposable)(ref val)).Dispose(); + return; + } + (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Limsa]); + int item3 = questBattleCounts.enabledCount; + int item4 = questBattleCounts.totalCount; + string obj = $"Limsa Lominsa ({ConfigComponent.FormatLevel(5)} - {ConfigComponent.FormatLevel(14)}) ({item3}/{item4})"; + string key = "Limsa"; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; + Save(); + } + DrawQuestTable("LimsaLominsa", _startingCityBattles[EAetheryteLocation.Limsa]); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; + Save(); + } + (int enabledCount, int totalCount) questBattleCounts2 = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Gridania]); + int item5 = questBattleCounts2.enabledCount; + int item6 = questBattleCounts2.totalCount; + string obj2 = $"Gridania ({ConfigComponent.FormatLevel(5)} - {ConfigComponent.FormatLevel(14)}) ({item5}/{item6})"; + string key2 = "Gridania"; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj2)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key2] = true; + Save(); + } + DrawQuestTable("Gridania", _startingCityBattles[EAetheryteLocation.Gridania]); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key2] = false; + Save(); + } + (int enabledCount, int totalCount) questBattleCounts3 = GetQuestBattleCounts(_startingCityBattles[EAetheryteLocation.Uldah]); + int item7 = questBattleCounts3.enabledCount; + int item8 = questBattleCounts3.totalCount; + string obj3 = $"Ul'dah ({ConfigComponent.FormatLevel(4)} - {ConfigComponent.FormatLevel(14)}) ({item7}/{item8})"; + string key3 = "Uldah"; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj3)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key3] = true; + Save(); + } + DrawQuestTable("Uldah", _startingCityBattles[EAetheryteLocation.Uldah]); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key3, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key3] = false; + Save(); + } + EExpansionVersion[] values = Enum.GetValues(); + for (int i = 0; i < values.Length; i++) + { + EExpansionVersion eExpansionVersion = values[i]; + if (!_mainScenarioBattles.TryGetValue(eExpansionVersion, out List value)) + { + continue; + } + (int enabledCount, int totalCount) questBattleCounts4 = GetQuestBattleCounts(value); + int item9 = questBattleCounts4.enabledCount; + int item10 = questBattleCounts4.totalCount; + string obj4 = $"{eExpansionVersion.ToFriendlyString()} ({item9}/{item10})"; + string key4 = eExpansionVersion.ToString(); + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj4)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key4] = true; + Save(); + } + DrawQuestTable($"Duties{eExpansionVersion}", value); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key4, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key4] = false; + Save(); + } } } private void DrawJobQuestConfigTable() { - //IL_0053: Unknown result type (might be due to invalid IL or missing references) - //IL_0058: 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_0066: Unknown result type (might be due to invalid IL or missing references) - //IL_006b: Unknown result type (might be due to invalid IL or missing references) - //IL_006c: Unknown result type (might be due to invalid IL or missing references) (int enabledCount, int totalCount) jobQuestCounts = GetJobQuestCounts(); int item = jobQuestCounts.enabledCount; int item2 = jobQuestCounts.totalCount; - ImU8String imU8String = new ImU8String(32, 2); - imU8String.AppendLiteral("Class/Job Quests ("); - imU8String.AppendFormatted(item); - imU8String.AppendLiteral("/"); - imU8String.AppendFormatted(item2); - imU8String.AppendLiteral(")###JobQuests"); - TabItemDisposable val = ImRaii.TabItem(imU8String); - try + ImU8String label = new ImU8String(32, 2); + label.AppendLiteral("Class/Job Quests ("); + label.AppendFormatted(item); + label.AppendLiteral("/"); + label.AppendFormatted(item2); + label.AppendLiteral(")###JobQuests"); + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem(label); + if (!tabItemDisposable) { - if (!val) - { - return; - } - ChildDisposable val2 = BeginChildArea(); - try - { - if (!val2) - { - return; - } - int num = 0; - foreach (var (eClassJob, num2) in _classJobUtils.SortedClassJobs) - { - if (eClassJob.IsCrafter() || eClassJob.IsGatherer() || !_jobQuestBattles.TryGetValue(eClassJob, out List value)) - { - continue; - } - if (num2 != num) - { - num = num2; - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Spacing(); - } - string text = eClassJob.ToFriendlyString(); - if (eClassJob.IsClass()) - { - text = text + " / " + eClassJob.AsJob().ToFriendlyString(); - } - (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(value); - int item3 = questBattleCounts.enabledCount; - int item4 = questBattleCounts.totalCount; - string obj = $"{text} ({item3}/{item4})"; - string key = eClassJob.ToString(); - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; - Save(); - } - DrawQuestTable($"JobQuests{eClassJob}", value); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; - Save(); - } - } - } - finally - { - ((ChildDisposable)(ref val2)).Dispose(); - } + return; } - finally + using ImRaii.ChildDisposable childDisposable = BeginChildArea(); + if (!childDisposable) { - ((TabItemDisposable)(ref val)).Dispose(); + return; + } + int num = 0; + foreach (var (eClassJob, num2) in _classJobUtils.SortedClassJobs) + { + if (eClassJob.IsCrafter() || eClassJob.IsGatherer() || !_jobQuestBattles.TryGetValue(eClassJob, out List value)) + { + continue; + } + if (num2 != num) + { + num = num2; + ImGui.Spacing(); + ImGui.Separator(); + ImGui.Spacing(); + } + string text = eClassJob.ToFriendlyString(); + if (eClassJob.IsClass()) + { + text = text + " / " + eClassJob.AsJob().ToFriendlyString(); + } + (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(value); + int item3 = questBattleCounts.enabledCount; + int item4 = questBattleCounts.totalCount; + string obj = $"{text} ({item3}/{item4})"; + string key = eClassJob.ToString(); + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; + Save(); + } + DrawQuestTable($"JobQuests{eClassJob}", value); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; + Save(); + } } } private void DrawRoleQuestConfigTable() { - //IL_0053: Unknown result type (might be due to invalid IL or missing references) - //IL_0058: 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_0066: Unknown result type (might be due to invalid IL or missing references) - //IL_006b: Unknown result type (might be due to invalid IL or missing references) - //IL_006c: Unknown result type (might be due to invalid IL or missing references) (int enabledCount, int totalCount) roleQuestCounts = GetRoleQuestCounts(); int item = roleQuestCounts.enabledCount; int item2 = roleQuestCounts.totalCount; - ImU8String imU8String = new ImU8String(28, 2); - imU8String.AppendLiteral("Role Quests ("); - imU8String.AppendFormatted(item); - imU8String.AppendLiteral("/"); - imU8String.AppendFormatted(item2); - imU8String.AppendLiteral(")###RoleQuests"); - TabItemDisposable val = ImRaii.TabItem(imU8String); - try + ImU8String label = new ImU8String(28, 2); + label.AppendLiteral("Role Quests ("); + label.AppendFormatted(item); + label.AppendLiteral("/"); + label.AppendFormatted(item2); + label.AppendLiteral(")###RoleQuests"); + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem(label); + if (!tabItemDisposable) { - if (!val) + return; + } + using ImRaii.ChildDisposable childDisposable = BeginChildArea(); + if (!childDisposable) + { + return; + } + foreach (var (eClassJob, value) in RoleQuestCategories) + { + if (!_roleQuestBattles.TryGetValue(eClassJob, out List value2)) { - return; + continue; } - ChildDisposable val2 = BeginChildArea(); - try + (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(value2); + int item3 = questBattleCounts.enabledCount; + int item4 = questBattleCounts.totalCount; + string obj = $"{value} ({item3}/{item4})"; + string key = $"Role_{eClassJob}"; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj)) { - if (!val2) + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) { - return; - } - foreach (var (eClassJob, value) in RoleQuestCategories) - { - if (!_roleQuestBattles.TryGetValue(eClassJob, out List value2)) - { - continue; - } - (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(value2); - int item3 = questBattleCounts.enabledCount; - int item4 = questBattleCounts.totalCount; - string obj = $"{value} ({item3}/{item4})"; - string key = $"Role_{eClassJob}"; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; - Save(); - } - DrawQuestTable($"RoleQuests{eClassJob}", value2); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; - Save(); - } - } - (int enabledCount, int totalCount) questBattleCounts2 = GetQuestBattleCounts(_otherRoleQuestBattles); - int item5 = questBattleCounts2.enabledCount; - int item6 = questBattleCounts2.totalCount; - string obj2 = $"General Role Quests ({item5}/{item6})"; - string key2 = "Role_General"; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj2)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key2] = true; - Save(); - } - DrawQuestTable("RoleQuestsGeneral", _otherRoleQuestBattles); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key2] = false; + base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; Save(); } + DrawQuestTable($"RoleQuests{eClassJob}", value2); } - finally + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) { - ((ChildDisposable)(ref val2)).Dispose(); + base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; + Save(); } } - finally + (int enabledCount, int totalCount) questBattleCounts2 = GetQuestBattleCounts(_otherRoleQuestBattles); + int item5 = questBattleCounts2.enabledCount; + int item6 = questBattleCounts2.totalCount; + string obj2 = $"General Role Quests ({item5}/{item6})"; + string key2 = "Role_General"; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj2)) { - ((TabItemDisposable)(ref val)).Dispose(); + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key2] = true; + Save(); + } + DrawQuestTable("RoleQuestsGeneral", _otherRoleQuestBattles); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key2, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key2] = false; + Save(); } } private void DrawOtherQuestConfigTable() { - //IL_0053: Unknown result type (might be due to invalid IL or missing references) - //IL_0058: 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_0066: Unknown result type (might be due to invalid IL or missing references) - //IL_006b: Unknown result type (might be due to invalid IL or missing references) - //IL_006c: Unknown result type (might be due to invalid IL or missing references) (int enabledCount, int totalCount) otherQuestCounts = GetOtherQuestCounts(); int item = otherQuestCounts.enabledCount; int item2 = otherQuestCounts.totalCount; - ImU8String imU8String = new ImU8String(29, 2); - imU8String.AppendLiteral("Other Quests ("); - imU8String.AppendFormatted(item); - imU8String.AppendLiteral("/"); - imU8String.AppendFormatted(item2); - imU8String.AppendLiteral(")###MiscQuests"); - TabItemDisposable val = ImRaii.TabItem(imU8String); - try + ImU8String label = new ImU8String(29, 2); + label.AppendLiteral("Other Quests ("); + label.AppendFormatted(item); + label.AppendLiteral("/"); + label.AppendFormatted(item2); + label.AppendLiteral(")###MiscQuests"); + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem(label); + if (!tabItemDisposable) { - if (!val) - { - return; - } - ChildDisposable val2 = BeginChildArea(); - try - { - if (!val2) - { - return; - } - foreach (var otherQuestBattle in _otherQuestBattles) - { - string item3 = otherQuestBattle.Label; - List item4 = otherQuestBattle.Item2; - (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(item4); - int item5 = questBattleCounts.enabledCount; - int item6 = questBattleCounts.totalCount; - string obj = $"{item3} ({item5}/{item6})"; - string key = "Other_" + item3; - ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); - if (ImGui.CollapsingHeader(obj)) - { - if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; - Save(); - } - DrawQuestTable("Other" + item3, item4); - } - else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) - { - base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; - Save(); - } - } - } - finally - { - ((ChildDisposable)(ref val2)).Dispose(); - } + return; } - finally + using ImRaii.ChildDisposable childDisposable = BeginChildArea(); + if (!childDisposable) { - ((TabItemDisposable)(ref val)).Dispose(); + return; + } + foreach (var otherQuestBattle in _otherQuestBattles) + { + string item3 = otherQuestBattle.Label; + List item4 = otherQuestBattle.Item2; + (int enabledCount, int totalCount) questBattleCounts = GetQuestBattleCounts(item4); + int item5 = questBattleCounts.enabledCount; + int item6 = questBattleCounts.totalCount; + string obj = $"{item3} ({item5}/{item6})"; + string key = "Other_" + item3; + ImGui.SetNextItemOpen(base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false), ImGuiCond.Always); + if (ImGui.CollapsingHeader(obj)) + { + if (!base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = true; + Save(); + } + DrawQuestTable("Other" + item3, item4); + } + else if (base.Configuration.SinglePlayerDuties.HeaderStates.GetValueOrDefault(key, defaultValue: false)) + { + base.Configuration.SinglePlayerDuties.HeaderStates[key] = false; + Save(); + } } } private void DrawQuestTable(string label, IReadOnlyList dutyInfos) { - //IL_000c: Unknown result type (might be due to invalid IL or missing references) - //IL_0011: Unknown result type (might be due to invalid IL or missing references) - //IL_0012: 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_00fe: Unknown result type (might be due to invalid IL or missing references) - TableDisposable val = ImRaii.Table((ImU8String)label, 2, ImGuiTableFlags.SizingFixedFit); - try + using ImRaii.TableDisposable tableDisposable = ImRaii.Table(label, 2, ImGuiTableFlags.SizingFixedFit); + if (!(bool)tableDisposable) { - if (!TableDisposable.op_Implicit(val)) - { - return; - } - ImGui.TableSetupColumn("Quest", ImGuiTableColumnFlags.WidthStretch); - ImGui.TableSetupColumn("Options", ImGuiTableColumnFlags.WidthFixed, 200f); - foreach (SinglePlayerDutyInfo dutyInfo in dutyInfos) - { - ImGui.TableNextRow(); - string[] array = (dutyInfo.EnabledByDefault ? SupportedCfcOptions : UnsupportedCfcOptions); - int currentItem = 0; - if (base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId)) - { - currentItem = 1; - } - if (base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId)) - { - currentItem = 2; - } - if (ImGui.TableNextColumn()) - { - ImGui.AlignTextToFramePadding(); - ImGui.TextUnformatted(dutyInfo.Name); - if (ImGui.IsItemHovered() && base.Configuration.Advanced.AdditionalStatusInformation) - { - TooltipDisposable val2 = ImRaii.Tooltip(); - try - { - if (((TooltipDisposable)(ref val2)).Alive) - { - ImGui.TextUnformatted(dutyInfo.Name); - ImGui.Separator(); - ImU8String text = new ImU8String(13, 1); - text.AppendLiteral("TerritoryId: "); - text.AppendFormatted(dutyInfo.TerritoryId); - ImGui.BulletText(text); - ImU8String text2 = new ImU8String(26, 1); - text2.AppendLiteral("ContentFinderConditionId: "); - text2.AppendFormatted(dutyInfo.ContentFinderConditionId); - ImGui.BulletText(text2); - } - } - finally - { - ((TooltipDisposable)(ref val2)).Dispose(); - } - } - if (!dutyInfo.Enabled) - { - ImGuiComponents.HelpMarker("Questionable doesn't include support for this quest.", FontAwesomeIcon.Times, (Vector4?)ImGuiColors.DalamudRed); - } - else if (dutyInfo.Notes.Count > 0) - { - ConfigComponent.DrawNotes(dutyInfo.EnabledByDefault, dutyInfo.Notes); - } - } - if (!ImGui.TableNextColumn()) - { - continue; - } - ImU8String imU8String = new ImU8String(6, 1); - imU8String.AppendLiteral("##Duty"); - imU8String.AppendFormatted(dutyInfo.ContentFinderConditionId); - IdDisposable val3 = ImRaii.PushId(imU8String, true); - try - { - DisabledDisposable val4 = ImRaii.Disabled(!dutyInfo.Enabled); - try - { - ImGui.SetNextItemWidth(200f); - if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan)array, array.Length)) - { - base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); - base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); - switch (currentItem) - { - case 1: - base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Add(dutyInfo.ContentFinderConditionId); - break; - case 2: - base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Add(dutyInfo.ContentFinderConditionId); - break; - } - Save(); - } - } - finally - { - ((IDisposable)val4)?.Dispose(); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - } + return; } - finally + ImGui.TableSetupColumn("Quest", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Options", ImGuiTableColumnFlags.WidthFixed, 200f); + foreach (SinglePlayerDutyInfo dutyInfo in dutyInfos) { - ((TableDisposable)(ref val)).Dispose(); + ImGui.TableNextRow(); + string[] array = (dutyInfo.EnabledByDefault ? SupportedCfcOptions : UnsupportedCfcOptions); + int currentItem = 0; + if (base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId)) + { + currentItem = 1; + } + if (base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Contains(dutyInfo.ContentFinderConditionId)) + { + currentItem = 2; + } + if (ImGui.TableNextColumn()) + { + ImGui.AlignTextToFramePadding(); + ImGui.TextUnformatted(dutyInfo.Name); + if (ImGui.IsItemHovered() && base.Configuration.Advanced.AdditionalStatusInformation) + { + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (tooltipDisposable.Alive) + { + ImGui.TextUnformatted(dutyInfo.Name); + ImGui.Separator(); + ImU8String text = new ImU8String(13, 1); + text.AppendLiteral("TerritoryId: "); + text.AppendFormatted(dutyInfo.TerritoryId); + ImGui.BulletText(text); + ImU8String text2 = new ImU8String(26, 1); + text2.AppendLiteral("ContentFinderConditionId: "); + text2.AppendFormatted(dutyInfo.ContentFinderConditionId); + ImGui.BulletText(text2); + } + } + if (!dutyInfo.Enabled) + { + ImGuiComponents.HelpMarker("Questionable doesn't include support for this quest.", FontAwesomeIcon.Times, ImGuiColors.DalamudRed); + } + else if (dutyInfo.Notes.Count > 0) + { + ConfigComponent.DrawNotes(dutyInfo.EnabledByDefault, dutyInfo.Notes); + } + } + if (!ImGui.TableNextColumn()) + { + continue; + } + ImU8String id = new ImU8String(6, 1); + id.AppendLiteral("##Duty"); + id.AppendFormatted(dutyInfo.ContentFinderConditionId); + using (ImRaii.PushId(id)) + { + using (ImRaii.Disabled(!dutyInfo.Enabled)) + { + ImGui.SetNextItemWidth(200f); + if (ImGui.Combo((ImU8String)string.Empty, ref currentItem, (ReadOnlySpan)array, array.Length)) + { + base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); + base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Remove(dutyInfo.ContentFinderConditionId); + switch (currentItem) + { + case 1: + base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Add(dutyInfo.ContentFinderConditionId); + break; + case 2: + base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Add(dutyInfo.ContentFinderConditionId); + break; + } + Save(); + } + } + } } } - private static ChildDisposable BeginChildArea() + private static ImRaii.ChildDisposable BeginChildArea() { - //IL_001a: Unknown result type (might be due to invalid IL or missing references) - return ImRaii.Child((ImU8String)"DutyConfiguration", new Vector2(725f, 400f), true); + return ImRaii.Child("DutyConfiguration", new Vector2(725f, 400f), border: true); } private void DrawEnableAllButton() @@ -881,8 +736,7 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent private void DrawClipboardButtons() { - DisabledDisposable val = ImRaii.Disabled(base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Count + base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Count == 0); - try + using (ImRaii.Disabled(base.Configuration.SinglePlayerDuties.WhitelistedSinglePlayerDutyCfcIds.Count + base.Configuration.SinglePlayerDuties.BlacklistedSinglePlayerDutyCfcIds.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Copy, "Export to clipboard")) { @@ -891,14 +745,9 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent ImGui.SetClipboardText("qst:single:" + Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(";", first.Concat(second))))); } } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); string text = ImGui.GetClipboardText().Trim(); - val = ImRaii.Disabled(string.IsNullOrEmpty(text) || !text.StartsWith("qst:single:", StringComparison.InvariantCulture)); - try + using (ImRaii.Disabled(string.IsNullOrEmpty(text) || !text.StartsWith("qst:single:", StringComparison.InvariantCulture))) { if (!ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Paste, "Import from Clipboard")) { @@ -922,16 +771,11 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent } Save(); } - finally - { - ((IDisposable)val)?.Dispose(); - } } private void DrawResetButton() { - DisabledDisposable val = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Undo, "Reset to default")) { @@ -940,10 +784,6 @@ internal sealed class SinglePlayerDutyConfigComponent : ConfigComponent Save(); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Hold CTRL to enable this button."); diff --git a/Questionable/Questionable.Windows.ConfigComponents/StopConditionComponent.cs b/Questionable/Questionable.Windows.ConfigComponents/StopConditionComponent.cs index 1d618ef..8c18ccb 100644 --- a/Questionable/Questionable.Windows.ConfigComponents/StopConditionComponent.cs +++ b/Questionable/Questionable.Windows.ConfigComponents/StopConditionComponent.cs @@ -67,142 +67,112 @@ internal sealed class StopConditionComponent : ConfigComponent public override void DrawTab() { - //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) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Stop###StopConditionns"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Stop###StopConditionns"); + if (!tabItemDisposable) { - if (!val) + return; + } + bool v = base.Configuration.Stop.Enabled; + if (ImGui.Checkbox("Enable stop conditions", ref v)) + { + base.Configuration.Stop.Enabled = v; + Save(); + } + ImGui.SameLine(); + ImGuiComponents.HelpMarker("Pause: Stops automation when condition is met, but allows resuming past it.\nStop: True stop, blocks automation from starting/resuming if condition is already met."); + ImGui.Separator(); + using (ImRaii.Disabled(!v)) + { + ImGui.Text("Stop when character level reaches:"); + int currentItem = (int)base.Configuration.Stop.LevelStopMode; + ImGui.SetNextItemWidth(100f); + if (ImGui.Combo((ImU8String)"##LevelMode", ref currentItem, (ReadOnlySpan)StopModeNames, StopModeNames.Length)) { - return; - } - bool v = base.Configuration.Stop.Enabled; - if (ImGui.Checkbox("Enable stop conditions", ref v)) - { - base.Configuration.Stop.Enabled = v; + base.Configuration.Stop.LevelStopMode = (Configuration.EStopConditionMode)currentItem; Save(); } ImGui.SameLine(); - ImGuiComponents.HelpMarker("Pause: Stops automation when condition is met, but allows resuming past it.\nStop: True stop, blocks automation from starting/resuming if condition is already met."); + using (ImRaii.Disabled(base.Configuration.Stop.LevelStopMode == Questionable.Configuration.EStopConditionMode.Off)) + { + int data = base.Configuration.Stop.TargetLevel; + ImGui.SetNextItemWidth(100f); + if (ImGui.InputInt("Target level", ref data, 1, 5)) + { + base.Configuration.Stop.TargetLevel = Math.Max(1, Math.Min(100, data)); + Save(); + } + int num = _objectTable.LocalPlayer?.Level ?? 0; + if (num > 0) + { + ImGui.SameLine(); + ImU8String text = new ImU8String(11, 1); + text.AppendLiteral("(Current: "); + text.AppendFormatted(num); + text.AppendLiteral(")"); + ImGui.TextDisabled(text); + } + } ImGui.Separator(); - DisabledDisposable val2 = ImRaii.Disabled(!v); - try + ImGui.Text("Stop on quest sequence (global):"); + int currentItem2 = (int)base.Configuration.Stop.SequenceStopMode; + ImGui.SetNextItemWidth(100f); + if (ImGui.Combo((ImU8String)"##SequenceMode", ref currentItem2, (ReadOnlySpan)StopModeNames, StopModeNames.Length)) { - ImGui.Text("Stop when character level reaches:"); - int currentItem = (int)base.Configuration.Stop.LevelStopMode; + base.Configuration.Stop.SequenceStopMode = (Configuration.EStopConditionMode)currentItem2; + Save(); + } + ImGui.SameLine(); + using (ImRaii.Disabled(base.Configuration.Stop.SequenceStopMode == Questionable.Configuration.EStopConditionMode.Off)) + { + int data2 = base.Configuration.Stop.TargetSequence; ImGui.SetNextItemWidth(100f); - if (ImGui.Combo((ImU8String)"##LevelMode", ref currentItem, (ReadOnlySpan)StopModeNames, StopModeNames.Length)) + if (ImGui.InputInt("Target sequence", ref data2, 1, 1)) { - base.Configuration.Stop.LevelStopMode = (Configuration.EStopConditionMode)currentItem; + base.Configuration.Stop.TargetSequence = Math.Max(0, Math.Min(255, data2)); Save(); } - ImGui.SameLine(); - DisabledDisposable val3 = ImRaii.Disabled(base.Configuration.Stop.LevelStopMode == Questionable.Configuration.EStopConditionMode.Off); - try + QuestController.QuestProgress currentQuest = _questController.CurrentQuest; + if (currentQuest != null) { - int data = base.Configuration.Stop.TargetLevel; - ImGui.SetNextItemWidth(100f); - if (ImGui.InputInt("Target level", ref data, 1, 5)) - { - base.Configuration.Stop.TargetLevel = Math.Max(1, Math.Min(100, data)); - Save(); - } - int num = _objectTable.LocalPlayer?.Level ?? 0; - if (num > 0) - { - ImGui.SameLine(); - ImU8String text = new ImU8String(11, 1); - text.AppendLiteral("(Current: "); - text.AppendFormatted(num); - text.AppendLiteral(")"); - ImGui.TextDisabled(text); - } + int sequence = currentQuest.Sequence; + ImGui.SameLine(); + ImU8String text2 = new ImU8String(11, 1); + text2.AppendLiteral("(Current: "); + text2.AppendFormatted(sequence); + text2.AppendLiteral(")"); + ImGui.TextDisabled(text2); } - finally + } + ImGui.TextWrapped("Note: Individual quest sequences below override this global setting."); + ImGui.Separator(); + ImGui.Text("Stop when completing quests (or reaching specific sequences):"); + DrawCurrentlyAcceptedQuests(); + _questSelector.DrawSelection(); + List questsToStopAfter = base.Configuration.Stop.QuestsToStopAfter; + if (questsToStopAfter.Count > 0) + { + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { - ((IDisposable)val3)?.Dispose(); - } - ImGui.Separator(); - ImGui.Text("Stop on quest sequence (global):"); - int currentItem2 = (int)base.Configuration.Stop.SequenceStopMode; - ImGui.SetNextItemWidth(100f); - if (ImGui.Combo((ImU8String)"##SequenceMode", ref currentItem2, (ReadOnlySpan)StopModeNames, StopModeNames.Length)) - { - base.Configuration.Stop.SequenceStopMode = (Configuration.EStopConditionMode)currentItem2; - Save(); - } - ImGui.SameLine(); - val3 = ImRaii.Disabled(base.Configuration.Stop.SequenceStopMode == Questionable.Configuration.EStopConditionMode.Off); - try - { - int data2 = base.Configuration.Stop.TargetSequence; - ImGui.SetNextItemWidth(100f); - if (ImGui.InputInt("Target sequence", ref data2, 1, 1)) + if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) { - base.Configuration.Stop.TargetSequence = Math.Max(0, Math.Min(255, data2)); - Save(); - } - QuestController.QuestProgress currentQuest = _questController.CurrentQuest; - if (currentQuest != null) - { - int sequence = currentQuest.Sequence; - ImGui.SameLine(); - ImU8String text2 = new ImU8String(11, 1); - text2.AppendLiteral("(Current: "); - text2.AppendFormatted(sequence); - text2.AppendLiteral(")"); - ImGui.TextDisabled(text2); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - ImGui.TextWrapped("Note: Individual quest sequences below override this global setting."); - ImGui.Separator(); - ImGui.Text("Stop when completing quests (or reaching specific sequences):"); - DrawCurrentlyAcceptedQuests(); - _questSelector.DrawSelection(); - List questsToStopAfter = base.Configuration.Stop.QuestsToStopAfter; - if (questsToStopAfter.Count > 0) - { - val3 = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try - { - if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) + foreach (ElementId item in questsToStopAfter) { - foreach (ElementId item in questsToStopAfter) - { - string key = item.ToString(); - base.Configuration.Stop.QuestSequences.Remove(key); - base.Configuration.Stop.QuestStopModes.Remove(key); - } - base.Configuration.Stop.QuestsToStopAfter.Clear(); - Save(); + string key = item.ToString(); + base.Configuration.Stop.QuestSequences.Remove(key); + base.Configuration.Stop.QuestStopModes.Remove(key); } + base.Configuration.Stop.QuestsToStopAfter.Clear(); + Save(); } - finally - { - ((IDisposable)val3)?.Dispose(); - } - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) - { - ImGui.SetTooltip("Hold CTRL to enable this button."); - } - ImGui.Separator(); - ImGui.Text("(Drag arrow buttons to reorder)"); } - DrawStopQuestList(questsToStopAfter); + if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) + { + ImGui.SetTooltip("Hold CTRL to enable this button."); + } + ImGui.Separator(); + ImGui.Text("(Drag arrow buttons to reorder)"); } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); + DrawStopQuestList(questsToStopAfter); } } @@ -221,11 +191,10 @@ internal sealed class StopConditionComponent : ConfigComponent { continue; } - ImU8String imU8String = new ImU8String(5, 1); - imU8String.AppendLiteral("Quest"); - imU8String.AppendFormatted(elementId); - IdDisposable val = ImRaii.PushId(imU8String, true); - try + ImU8String id = new ImU8String(5, 1); + id.AppendLiteral("Quest"); + id.AppendFormatted(elementId); + using (ImRaii.PushId(id)) { ImGui.AlignTextToFramePadding(); ImU8String text = new ImU8String(1, 1); @@ -283,8 +252,7 @@ internal sealed class StopConditionComponent : ConfigComponent { ImGui.SetTooltip("Stop at specific sequence (unchecked = stop on quest completion)"); } - DisabledDisposable val2 = ImRaii.Disabled(!v); - try + using (ImRaii.Disabled(!v)) { ImGui.SameLine(); ImGui.Text("Seq:"); @@ -300,21 +268,12 @@ internal sealed class StopConditionComponent : ConfigComponent Save(); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } if (questsToStopAfter.Count > 1) { - FontDisposable val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.ArrowsUpDown.ToIconString()).X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 4f - ImGui.GetStyle().ItemSpacing.X); } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (_draggedItem == elementId) { ImGuiComponents.IconButton("##Move", FontAwesomeIcon.ArrowsUpDown, ImGui.ColorConvertU32ToFloat4(ImGui.GetColorU32(ImGuiCol.ButtonActive))); @@ -331,25 +290,16 @@ internal sealed class StopConditionComponent : ConfigComponent } else { - FontDisposable val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); } - finally - { - ((IDisposable)val3)?.Dispose(); - } } if (ImGuiComponents.IconButton($"##Remove{i}", FontAwesomeIcon.Times)) { quest = quest3; } } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector2 item2 = new Vector2(item.X + x, ImGui.GetCursorScreenPos().Y - ImGui.GetStyle().ItemSpacing.Y + 2f); list.Add((item, item2)); } @@ -390,25 +340,20 @@ internal sealed class StopConditionComponent : ConfigComponent private void DrawCurrentlyAcceptedQuests() { - //IL_0030: Unknown result type (might be due to invalid IL or missing references) - //IL_0035: Unknown result type (might be due to invalid IL or missing references) - //IL_0036: Unknown result type (might be due to invalid IL or missing references) List currentlyAcceptedQuests = GetCurrentlyAcceptedQuests(); ImGui.Text("Currently Accepted Quests:"); - ChildDisposable val = ImRaii.Child((ImU8String)"AcceptedQuestsList", new Vector2(-1f, 120f), true); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("AcceptedQuestsList", new Vector2(-1f, 120f), border: true)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { if (currentlyAcceptedQuests.Count > 0) { foreach (Quest item in currentlyAcceptedQuests) { - ImU8String imU8String = new ImU8String(13, 1); - imU8String.AppendLiteral("AcceptedQuest"); - imU8String.AppendFormatted(item.Id); - IdDisposable val2 = ImRaii.PushId(imU8String, true); - try + ImU8String id = new ImU8String(13, 1); + id.AppendLiteral("AcceptedQuest"); + id.AppendFormatted(item.Id); + using (ImRaii.PushId(id)) { (Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(item.Id); bool flag = false; @@ -426,17 +371,11 @@ internal sealed class StopConditionComponent : ConfigComponent { _questTooltipComponent.Draw(item.Info); } - FontDisposable val3 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.Plus.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); } - finally - { - ((IDisposable)val3)?.Dispose(); - } - DisabledDisposable val4 = ImRaii.Disabled(flag2); - try + using (ImRaii.Disabled(flag2)) { if (ImGuiComponents.IconButton($"##Add{item.Id}", FontAwesomeIcon.Plus)) { @@ -445,19 +384,11 @@ internal sealed class StopConditionComponent : ConfigComponent Save(); } } - finally - { - ((IDisposable)val4)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip(flag2 ? "Quest already added to stop conditions" : "Add this quest to stop conditions"); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } } } else @@ -468,10 +399,6 @@ internal sealed class StopConditionComponent : ConfigComponent } } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } ImGui.Spacing(); } diff --git a/Questionable/Questionable.Windows.JournalComponents/AlliedSocietyJournalComponent.cs b/Questionable/Questionable.Windows.JournalComponents/AlliedSocietyJournalComponent.cs index 9a5ec75..71be9de 100644 --- a/Questionable/Questionable.Windows.JournalComponents/AlliedSocietyJournalComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/AlliedSocietyJournalComponent.cs @@ -61,45 +61,30 @@ internal sealed class AlliedSocietyJournalComponent public void DrawAlliedSocietyQuests() { - //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) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Allied Societies"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Allied Societies"); + if (!tabItemDisposable) { - if (!val) + return; + } + DrawDailyAllowanceHeader(); + foreach (EAlliedSociety item in from x in Enum.GetValues() + where x != EAlliedSociety.None + select x) + { + List list = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(item) + select (QuestInfo)_questData.GetQuestInfo(x)).ToList(); + if (list.Count != 0 && DrawAlliedSocietyHeader(item, list)) { - return; - } - DrawDailyAllowanceHeader(); - foreach (EAlliedSociety item in from x in Enum.GetValues() - where x != EAlliedSociety.None - select x) - { - List list = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(item) - select (QuestInfo)_questData.GetQuestInfo(x)).ToList(); - if (list.Count != 0 && DrawAlliedSocietyHeader(item, list)) + using (ImRaii.PushIndent()) { - IndentDisposable val2 = ImRaii.PushIndent(1, true); - try - { - DrawAddToPriorityButtons(item, list); - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Spacing(); - DrawQuestList(item, list); - } - finally - { - ((IDisposable)val2)?.Dispose(); - } + DrawAddToPriorityButtons(item, list); + ImGui.Spacing(); + ImGui.Separator(); + ImGui.Spacing(); + DrawQuestList(item, list); } } } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); - } } private unsafe void DrawDailyAllowanceHeader() @@ -286,15 +271,10 @@ internal sealed class AlliedSocietyJournalComponent private static void DrawDisabledAddButton() { - DisabledDisposable val = ImRaii.Disabled(true); - try + using (ImRaii.Disabled(disabled: true)) { ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, "Add to Priority"); } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("No quests available to add (may be disabled, already in priority, or not available)"); @@ -304,8 +284,7 @@ internal sealed class AlliedSocietyJournalComponent private void DrawArrSocietyButtons(EAlliedSociety alliedSociety, List availableQuests, int dailyLimit, int remainingAllowances) { int num = Math.Min(Math.Min(dailyLimit, remainingAllowances), availableQuests.Count); - DisabledDisposable val = ImRaii.Disabled(remainingAllowances == 0); - try + using (ImRaii.Disabled(remainingAllowances == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, num switch { @@ -318,10 +297,6 @@ internal sealed class AlliedSocietyJournalComponent AddQuestsToPriority(alliedSociety, availableQuests.Take(num).ToList()); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { DrawRecommendedButtonTooltip(num, remainingAllowances, dailyLimit, alliedSociety, availableQuests.Count); @@ -342,8 +317,7 @@ internal sealed class AlliedSocietyJournalComponent ImGui.BeginTooltip(); if (remainingAllowances == 0) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImU8String text = new ImU8String(0, 1); text.AppendFormatted(SeIconChar.Cross.ToIconString()); @@ -351,10 +325,6 @@ internal sealed class AlliedSocietyJournalComponent ImGui.SameLine(); ImGui.TextUnformatted("No daily allowances remaining"); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text2 = new ImU8String(44, 1); text2.AppendLiteral("You've used all "); @@ -364,8 +334,7 @@ internal sealed class AlliedSocietyJournalComponent } else if (questsToAddCount == remainingAllowances && questsToAddCount < availableCount) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) { ImU8String text3 = new ImU8String(0, 1); text3.AppendFormatted(SeIconChar.QuestSync.ToIconString()); @@ -378,10 +347,6 @@ internal sealed class AlliedSocietyJournalComponent text4.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); ImGui.TextUnformatted(text4); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text5 = new ImU8String(44, 2); text5.AppendLiteral("You can complete "); @@ -395,8 +360,7 @@ internal sealed class AlliedSocietyJournalComponent } else if (questsToAddCount == dailyLimit) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) { ImU8String text6 = new ImU8String(0, 1); text6.AppendFormatted(SeIconChar.QuestSync.ToIconString()); @@ -408,10 +372,6 @@ internal sealed class AlliedSocietyJournalComponent text7.AppendLiteral(" quests"); ImGui.TextUnformatted(text7); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text8 = new ImU8String(51, 2); text8.AppendLiteral("This will use "); @@ -425,8 +385,7 @@ internal sealed class AlliedSocietyJournalComponent } else if (questsToAddCount == availableCount) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) { ImU8String text9 = new ImU8String(0, 1); text9.AppendFormatted(SeIconChar.QuestSync.ToIconString()); @@ -441,10 +400,6 @@ internal sealed class AlliedSocietyJournalComponent text10.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); ImGui.TextUnformatted(text10); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text11 = new ImU8String(37, 2); text11.AppendLiteral("Uses "); @@ -458,8 +413,7 @@ internal sealed class AlliedSocietyJournalComponent } else { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) { ImU8String text12 = new ImU8String(0, 1); text12.AppendFormatted(SeIconChar.BoxedLetterQ.ToIconString()); @@ -474,10 +428,6 @@ internal sealed class AlliedSocietyJournalComponent text13.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests"); ImGui.TextUnformatted(text13); } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text14 = new ImU8String(55, 2); text14.AppendLiteral("Limited by available quests ("); @@ -497,8 +447,7 @@ internal sealed class AlliedSocietyJournalComponent ImGui.BeginTooltip(); if (availableCount > remainingAllowances) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) { ImU8String text = new ImU8String(0, 1); text.AppendFormatted(SeIconChar.Cross.ToIconString()); @@ -506,10 +455,6 @@ internal sealed class AlliedSocietyJournalComponent ImGui.SameLine(); ImGui.TextUnformatted("Warning: Exceeds remaining allowances"); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.Spacing(); ImU8String text2 = new ImU8String(54, 1); text2.AppendLiteral("This adds all "); @@ -528,8 +473,7 @@ internal sealed class AlliedSocietyJournalComponent } else if (availableCount > dailyLimit) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) { ImU8String text4 = new ImU8String(0, 1); text4.AppendFormatted(SeIconChar.Cross.ToIconString()); @@ -537,10 +481,6 @@ internal sealed class AlliedSocietyJournalComponent ImGui.SameLine(); ImGui.TextUnformatted("Warning: Exceeds daily optimal amount"); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.Spacing(); ImU8String text5 = new ImU8String(32, 1); text5.AppendLiteral("This adds all "); @@ -563,8 +503,7 @@ internal sealed class AlliedSocietyJournalComponent } else { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) { ImU8String text8 = new ImU8String(0, 1); text8.AppendFormatted(SeIconChar.QuestSync.ToIconString()); @@ -579,10 +518,6 @@ internal sealed class AlliedSocietyJournalComponent text9.AppendFormatted((availableCount == 1) ? "quest" : "quests"); ImGui.TextUnformatted(text9); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.Spacing(); Vector4 col = ImGuiColors.DalamudGrey3; ImU8String text10 = new ImU8String(27, 2); @@ -626,8 +561,7 @@ internal sealed class AlliedSocietyJournalComponent ImGui.Spacing(); if (availableQuests.Count <= remainingAllowances) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen)) { ImU8String text2 = new ImU8String(0, 1); text2.AppendFormatted(SeIconChar.QuestSync.ToIconString()); @@ -642,16 +576,11 @@ internal sealed class AlliedSocietyJournalComponent text3.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances"); ImGui.TextUnformatted(text3); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today"); } else { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) { ImU8String text4 = new ImU8String(0, 1); text4.AppendFormatted(SeIconChar.Cross.ToIconString()); @@ -663,10 +592,6 @@ internal sealed class AlliedSocietyJournalComponent text5.AppendLiteral(")"); ImGui.TextUnformatted(text5); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.TextColored(ImGuiColors.DalamudGrey3, "Some quests won't be completable until tomorrow"); } ImGui.EndTooltip(); diff --git a/Questionable/Questionable.Windows.JournalComponents/DutyJournalComponent.cs b/Questionable/Questionable.Windows.JournalComponents/DutyJournalComponent.cs index f6aa84e..c3747fd 100644 --- a/Questionable/Questionable.Windows.JournalComponents/DutyJournalComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/DutyJournalComponent.cs @@ -62,60 +62,42 @@ internal sealed class DutyJournalComponent public void DrawDuties() { - //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_009f: Unknown result type (might be due to invalid IL or missing references) - //IL_00a4: Unknown result type (might be due to invalid IL or missing references) - //IL_00a5: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Duties"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Duties"); + if (!tabItemDisposable) { - if (!val) + return; + } + if (ImGui.CollapsingHeader("Explanation", ImGuiTreeNodeFlags.DefaultOpen)) + { + ImGui.Text("The list below shows all duties and their unlock status."); + ImGui.BulletText("'Unlocked' shows duties you have access to."); + ImGui.BulletText("'Completed' shows duties you have finished at least once."); + ImGui.BulletText("Click on a duty to see which quest unlocks it."); + ImGui.Spacing(); + ImGui.Separator(); + ImGui.Spacing(); + } + DrawFilterControls(); + if (_filteredCategories.Count > 0) + { + using (ImRaii.TableDisposable tableDisposable = ImRaii.Table("Duties", 3, ImGuiTableFlags.NoSavedSettings)) { - return; - } - if (ImGui.CollapsingHeader("Explanation", ImGuiTreeNodeFlags.DefaultOpen)) - { - ImGui.Text("The list below shows all duties and their unlock status."); - ImGui.BulletText("'Unlocked' shows duties you have access to."); - ImGui.BulletText("'Completed' shows duties you have finished at least once."); - ImGui.BulletText("Click on a duty to see which quest unlocks it."); - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Spacing(); - } - DrawFilterControls(); - if (_filteredCategories.Count > 0) - { - TableDisposable val2 = ImRaii.Table((ImU8String)"Duties", 3, ImGuiTableFlags.NoSavedSettings); - try + if (!tableDisposable) { - if (!val2) - { - return; - } - ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); - ImGui.TableSetupColumn("Unlocked", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); - ImGui.TableSetupColumn("Completed", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); - ImGui.TableHeadersRow(); - foreach (DutyCategory filteredCategory in _filteredCategories) - { - DrawCategory(filteredCategory); - } return; } - finally + ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); + ImGui.TableSetupColumn("Unlocked", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); + ImGui.TableSetupColumn("Completed", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); + ImGui.TableHeadersRow(); + foreach (DutyCategory filteredCategory in _filteredCategories) { - ((TableDisposable)(ref val2)).Dispose(); + DrawCategory(filteredCategory); } + return; } - ImGui.Text("No duties match your search."); - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } + ImGui.Text("No duties match your search."); } private void DrawFilterControls() @@ -192,78 +174,69 @@ internal sealed class DutyJournalComponent private void DrawDutyTooltip(DutyInfo duty) { - //IL_0000: Unknown result type (might be due to invalid IL or missing references) - //IL_0005: Unknown result type (might be due to invalid IL or missing references) - TooltipDisposable val = ImRaii.Tooltip(); - try + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (!tooltipDisposable.Alive) { - if (!((TooltipDisposable)(ref val)).Alive) + return; + } + ImGui.TextColored(ImGuiColors.DalamudWhite, duty.Name); + Vector4 col = ImGuiColors.DalamudGrey; + ImU8String text = new ImU8String(12, 1); + text.AppendLiteral("Content ID: "); + text.AppendFormatted(duty.ContentFinderConditionId); + ImGui.TextColored(in col, text); + ImGui.Separator(); + ImU8String text2 = new ImU8String(16, 1); + text2.AppendLiteral("Level Required: "); + text2.AppendFormatted(duty.Level); + ImGui.Text(text2); + if (duty.ItemLevel > 0) + { + ImU8String text3 = new ImU8String(21, 1); + text3.AppendLiteral("Item Level Required: "); + text3.AppendFormatted(duty.ItemLevel); + ImGui.Text(text3); + } + ImU8String text4 = new ImU8String(6, 1); + text4.AppendLiteral("Type: "); + text4.AppendFormatted(duty.ContentTypeName); + ImGui.Text(text4); + if (duty.IsHighEndDuty) + { + ImGui.SameLine(); + ImGui.TextColored(ImGuiColors.DalamudOrange, "(High-End)"); + } + ImGui.Separator(); + if (duty.IsUnlocked) + { + ImGui.TextColored(ImGuiColors.ParsedGreen, "Status: Unlocked"); + } + else + { + ImGui.TextColored(ImGuiColors.DalamudRed, "Status: Locked"); + } + if (duty.UnlockQuests.Count > 0) + { + ImGui.Separator(); + ImGui.Text("Unlock Quest(s):"); { + foreach (QuestId unlockQuest in duty.UnlockQuests) + { + if (_questData.TryGetQuestInfo(unlockQuest, out IQuestInfo questInfo)) + { + var (color, icon, _) = _uiUtils.GetQuestStyle(unlockQuest); + _uiUtils.ChecklistItem($"{questInfo.Name} ({unlockQuest})", color, icon); + } + else + { + _uiUtils.ChecklistItem($"Unknown Quest ({unlockQuest})", ImGuiColors.DalamudGrey, FontAwesomeIcon.Question); + } + } return; } - ImGui.TextColored(ImGuiColors.DalamudWhite, duty.Name); - Vector4 col = ImGuiColors.DalamudGrey; - ImU8String text = new ImU8String(12, 1); - text.AppendLiteral("Content ID: "); - text.AppendFormatted(duty.ContentFinderConditionId); - ImGui.TextColored(in col, text); - ImGui.Separator(); - ImU8String text2 = new ImU8String(16, 1); - text2.AppendLiteral("Level Required: "); - text2.AppendFormatted(duty.Level); - ImGui.Text(text2); - if (duty.ItemLevel > 0) - { - ImU8String text3 = new ImU8String(21, 1); - text3.AppendLiteral("Item Level Required: "); - text3.AppendFormatted(duty.ItemLevel); - ImGui.Text(text3); - } - ImU8String text4 = new ImU8String(6, 1); - text4.AppendLiteral("Type: "); - text4.AppendFormatted(duty.ContentTypeName); - ImGui.Text(text4); - if (duty.IsHighEndDuty) - { - ImGui.SameLine(); - ImGui.TextColored(ImGuiColors.DalamudOrange, "(High-End)"); - } - ImGui.Separator(); - if (duty.IsUnlocked) - { - ImGui.TextColored(ImGuiColors.ParsedGreen, "Status: Unlocked"); - } - else - { - ImGui.TextColored(ImGuiColors.DalamudRed, "Status: Locked"); - } - if (duty.UnlockQuests.Count > 0) - { - ImGui.Separator(); - ImGui.Text("Unlock Quest(s):"); - { - foreach (QuestId unlockQuest in duty.UnlockQuests) - { - if (_questData.TryGetQuestInfo(unlockQuest, out IQuestInfo questInfo)) - { - var (color, icon, _) = _uiUtils.GetQuestStyle(unlockQuest); - _uiUtils.ChecklistItem($"{questInfo.Name} ({unlockQuest})", color, icon); - } - else - { - _uiUtils.ChecklistItem($"Unknown Quest ({unlockQuest})", ImGuiColors.DalamudGrey, FontAwesomeIcon.Question); - } - } - return; - } - } - ImGui.Separator(); - ImGui.TextColored(ImGuiColors.DalamudGrey, "No unlock quest data available."); - } - finally - { - ((TooltipDisposable)(ref val)).Dispose(); } + ImGui.Separator(); + ImGui.TextColored(ImGuiColors.DalamudGrey, "No unlock quest data available."); } private void DrawDutyStatus(bool? status) diff --git a/Questionable/Questionable.Windows.JournalComponents/GatheringJournalComponent.cs b/Questionable/Questionable.Windows.JournalComponents/GatheringJournalComponent.cs index 1094ecc..7571c6c 100644 --- a/Questionable/Questionable.Windows.JournalComponents/GatheringJournalComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/GatheringJournalComponent.cs @@ -202,54 +202,36 @@ internal sealed class GatheringJournalComponent public void DrawGatheringItems() { - //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_0078: Unknown result type (might be due to invalid IL or missing references) - //IL_007d: Unknown result type (might be due to invalid IL or missing references) - //IL_007e: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Gathering Points"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Gathering Points"); + if (!tabItemDisposable) { - if (!val) + return; + } + ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); + if (ImGui.InputTextWithHint(string.Empty, "Search areas, gathering points and items", ref _searchText, 256)) + { + UpdateFilter(); + } + if (_filteredExpansions.Count > 0) + { + using (ImRaii.TableDisposable tableDisposable = ImRaii.Table("GatheringPoints", 3, ImGuiTableFlags.NoSavedSettings)) { - return; - } - ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); - if (ImGui.InputTextWithHint(string.Empty, "Search areas, gathering points and items", ref _searchText, 256)) - { - UpdateFilter(); - } - if (_filteredExpansions.Count > 0) - { - TableDisposable val2 = ImRaii.Table((ImU8String)"GatheringPoints", 3, ImGuiTableFlags.NoSavedSettings); - try + if (!tableDisposable) { - if (!val2) - { - return; - } - ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); - ImGui.TableSetupColumn("Supported", ImGuiTableColumnFlags.WidthFixed, 100f * ImGui.GetIO().FontGlobalScale); - ImGui.TableSetupColumn("Collected", ImGuiTableColumnFlags.WidthFixed, 100f * ImGui.GetIO().FontGlobalScale); - ImGui.TableHeadersRow(); - foreach (FilteredExpansion filteredExpansion in _filteredExpansions) - { - DrawExpansion(filteredExpansion); - } return; } - finally + ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); + ImGui.TableSetupColumn("Supported", ImGuiTableColumnFlags.WidthFixed, 100f * ImGui.GetIO().FontGlobalScale); + ImGui.TableSetupColumn("Collected", ImGuiTableColumnFlags.WidthFixed, 100f * ImGui.GetIO().FontGlobalScale); + ImGui.TableHeadersRow(); + foreach (FilteredExpansion filteredExpansion in _filteredExpansions) { - ((TableDisposable)(ref val2)).Dispose(); + DrawExpansion(filteredExpansion); } + return; } - ImGui.Text("No area, gathering point or item matches your search text."); - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } + ImGui.Text("No area, gathering point or item matches your search text."); } private void DrawExpansion(FilteredExpansion expansion) diff --git a/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs b/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs index f82f238..ec07221 100644 --- a/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs @@ -119,84 +119,66 @@ internal sealed class QuestJournalComponent public void DrawQuests() { - //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_016d: Unknown result type (might be due to invalid IL or missing references) - //IL_0172: Unknown result type (might be due to invalid IL or missing references) - //IL_0173: Unknown result type (might be due to invalid IL or missing references) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Quests"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Quests"); + if (!tabItemDisposable) { - if (!val) + return; + } + bool hideSeasonalEventsFromJournalProgress = _configuration.General.HideSeasonalEventsFromJournalProgress; + if (hideSeasonalEventsFromJournalProgress != _lastHideSeasonalGlobally) + { + _lastHideSeasonalGlobally = hideSeasonalEventsFromJournalProgress; + _logger.LogDebug("Configuration change detected: HideSeasonalEventsFromJournalProgress={Hide} - refreshing journal", hideSeasonalEventsFromJournalProgress); + UpdateFilter(); + } + if (ImGui.CollapsingHeader("Explanation", ImGuiTreeNodeFlags.DefaultOpen)) + { + ImGui.Text("The list below contains all quests that appear in your journal."); + ImGui.BulletText("'Supported' lists quests that Questionable can do for you"); + ImGui.BulletText("'Completed' lists quests your current character has completed."); + ImGui.BulletText("Not all quests can be completed even if they're listed as available, e.g. starting city quest chains or past seasonal events."); + ImGui.Spacing(); + ImGui.Separator(); + ImGui.Spacing(); + } + QuestJournalUtils.ShowFilterContextMenu(this); + ImGui.SameLine(); + _questJournalUtils.AddAllAvailableQuests(); + ImGui.SameLine(); + if (ImGuiComponents.IconButton(FontAwesomeIcon.GlobeEurope)) + { + Util.OpenLink("https://wigglymuffin.github.io/FFXIV-Tools/"); + } + if (ImGui.IsItemHovered()) + { + ImGui.SetTooltip("View All Quest Paths Online"); + } + ImGui.SameLine(); + ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); + if (ImGui.InputTextWithHint(string.Empty, "Search quests and categories", ref Filter.SearchText, 256)) + { + UpdateFilter(); + } + if (_filteredSections.Count > 0) + { + using (ImRaii.TableDisposable tableDisposable = ImRaii.Table("Quests", 3, ImGuiTableFlags.NoSavedSettings)) { - return; - } - bool hideSeasonalEventsFromJournalProgress = _configuration.General.HideSeasonalEventsFromJournalProgress; - if (hideSeasonalEventsFromJournalProgress != _lastHideSeasonalGlobally) - { - _lastHideSeasonalGlobally = hideSeasonalEventsFromJournalProgress; - _logger.LogDebug("Configuration change detected: HideSeasonalEventsFromJournalProgress={Hide} - refreshing journal", hideSeasonalEventsFromJournalProgress); - UpdateFilter(); - } - if (ImGui.CollapsingHeader("Explanation", ImGuiTreeNodeFlags.DefaultOpen)) - { - ImGui.Text("The list below contains all quests that appear in your journal."); - ImGui.BulletText("'Supported' lists quests that Questionable can do for you"); - ImGui.BulletText("'Completed' lists quests your current character has completed."); - ImGui.BulletText("Not all quests can be completed even if they're listed as available, e.g. starting city quest chains or past seasonal events."); - ImGui.Spacing(); - ImGui.Separator(); - ImGui.Spacing(); - } - QuestJournalUtils.ShowFilterContextMenu(this); - ImGui.SameLine(); - _questJournalUtils.AddAllAvailableQuests(); - ImGui.SameLine(); - if (ImGuiComponents.IconButton(FontAwesomeIcon.GlobeEurope)) - { - Util.OpenLink("https://wigglymuffin.github.io/FFXIV-Tools/"); - } - if (ImGui.IsItemHovered()) - { - ImGui.SetTooltip("View All Quest Paths Online"); - } - ImGui.SameLine(); - ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); - if (ImGui.InputTextWithHint(string.Empty, "Search quests and categories", ref Filter.SearchText, 256)) - { - UpdateFilter(); - } - if (_filteredSections.Count > 0) - { - TableDisposable val2 = ImRaii.Table((ImU8String)"Quests", 3, ImGuiTableFlags.NoSavedSettings); - try + if (!tableDisposable) { - if (!val2) - { - return; - } - ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); - ImGui.TableSetupColumn("Supported", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); - ImGui.TableSetupColumn("Completed", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); - ImGui.TableHeadersRow(); - foreach (FilteredSection filteredSection in _filteredSections) - { - DrawSection(filteredSection); - } return; } - finally + ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.NoHide); + ImGui.TableSetupColumn("Supported", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); + ImGui.TableSetupColumn("Completed", ImGuiTableColumnFlags.WidthFixed, 120f * ImGui.GetIO().FontGlobalScale); + ImGui.TableHeadersRow(); + foreach (FilteredSection filteredSection in _filteredSections) { - ((TableDisposable)(ref val2)).Dispose(); + DrawSection(filteredSection); } + return; } - ImGui.Text("No quest or category matches your search."); - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); } + ImGui.Text("No quest or category matches your search."); } private void DrawSection(FilteredSection filter) diff --git a/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs b/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs index 721f7a3..0f97b39 100644 --- a/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs +++ b/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Linq; using Dalamud.Bindings.ImGui; @@ -45,9 +44,6 @@ internal sealed class QuestJournalUtils public void ShowContextMenu(IQuestInfo questInfo, Quest? quest, string label) { - //IL_0057: Unknown result type (might be due to invalid IL or missing references) - //IL_005c: Unknown result type (might be due to invalid IL or missing references) - //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) { ImU8String strId = new ImU8String(12, 1); @@ -55,90 +51,68 @@ internal sealed class QuestJournalUtils strId.AppendFormatted(questInfo.QuestId); ImGui.OpenPopup(strId); } - ImU8String imU8String = new ImU8String(12, 1); - imU8String.AppendLiteral("##QuestPopup"); - imU8String.AppendFormatted(questInfo.QuestId); - PopupDisposable val = ImRaii.Popup(imU8String); - try + ImU8String id = new ImU8String(12, 1); + id.AppendLiteral("##QuestPopup"); + id.AppendFormatted(questInfo.QuestId); + using ImRaii.PopupDisposable popupDisposable = ImRaii.Popup(id); + if (!popupDisposable) { - if (!val) + return; + } + using (ImRaii.Disabled(!_questFunctions.IsReadyToAcceptQuest(questInfo.QuestId) || quest == null || quest.Root.Disabled)) + { + if (ImGui.MenuItem("Start as next quest")) { - return; - } - DisabledDisposable val2 = ImRaii.Disabled(!_questFunctions.IsReadyToAcceptQuest(questInfo.QuestId) || quest == null || quest.Root.Disabled); - try - { - if (ImGui.MenuItem("Start as next quest")) - { - _questController.SetNextQuest(quest); - _questController.Start(label); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); - } - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) - { - if (!_questFunctions.IsReadyToAcceptQuest(questInfo.QuestId)) - { - ImGui.SetTooltip("Quest is not ready to accept"); - } - else if (quest == null) - { - ImGui.SetTooltip("Quest has no path available"); - } - else if (quest.Root.Disabled) - { - ImGui.SetTooltip("Quest path is disabled"); - } - } - List incompletePrerequisiteQuests = GetIncompletePrerequisiteQuests(questInfo); - val2 = ImRaii.Disabled(incompletePrerequisiteQuests.Count == 0); - try - { - if (ImGui.MenuItem(incompletePrerequisiteQuests.Count switch - { - 0 => "Add quest and requirements to priority", - 1 => "Add 1 quest to priority", - _ => $"Add {incompletePrerequisiteQuests.Count} quests to priority", - })) - { - AddRequiredQuestsToPriority(questInfo, incompletePrerequisiteQuests); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); - } - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) - { - if (incompletePrerequisiteQuests.Count == 0) - { - ImGui.SetTooltip("No quests to add (quest may be complete, disabled, locked with no unlock path, or already in priority)"); - } - else - { - ImGui.SetTooltip((incompletePrerequisiteQuests.Count == 1) ? "Add this quest to the priority list" : $"Add this quest and {incompletePrerequisiteQuests.Count - 1} required {((incompletePrerequisiteQuests.Count - 1 == 1) ? "quest" : "quests")} to the priority list in completion order"); - } - } - bool flag = _commandManager.Commands.ContainsKey("/questinfo"); - val2 = ImRaii.Disabled(!(questInfo.QuestId is QuestId) || !flag); - try - { - if (ImGui.MenuItem("View in Quest Map")) - { - _commandManager.ProcessCommand($"/questinfo {questInfo.QuestId}"); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); + _questController.SetNextQuest(quest); + _questController.Start(label); } } - finally + if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { - ((PopupDisposable)(ref val)).Dispose(); + if (!_questFunctions.IsReadyToAcceptQuest(questInfo.QuestId)) + { + ImGui.SetTooltip("Quest is not ready to accept"); + } + else if (quest == null) + { + ImGui.SetTooltip("Quest has no path available"); + } + else if (quest.Root.Disabled) + { + ImGui.SetTooltip("Quest path is disabled"); + } + } + List incompletePrerequisiteQuests = GetIncompletePrerequisiteQuests(questInfo); + using (ImRaii.Disabled(incompletePrerequisiteQuests.Count == 0)) + { + if (ImGui.MenuItem(incompletePrerequisiteQuests.Count switch + { + 0 => "Add quest and requirements to priority", + 1 => "Add 1 quest to priority", + _ => $"Add {incompletePrerequisiteQuests.Count} quests to priority", + })) + { + AddRequiredQuestsToPriority(questInfo, incompletePrerequisiteQuests); + } + } + if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) + { + if (incompletePrerequisiteQuests.Count == 0) + { + ImGui.SetTooltip("No quests to add (quest may be complete, disabled, locked with no unlock path, or already in priority)"); + } + else + { + ImGui.SetTooltip((incompletePrerequisiteQuests.Count == 1) ? "Add this quest to the priority list" : $"Add this quest and {incompletePrerequisiteQuests.Count - 1} required {((incompletePrerequisiteQuests.Count - 1 == 1) ? "quest" : "quests")} to the priority list in completion order"); + } + } + bool flag = _commandManager.Commands.ContainsKey("/questinfo"); + using (ImRaii.Disabled(!(questInfo.QuestId is QuestId) || !flag)) + { + if (ImGui.MenuItem("View in Quest Map")) + { + _commandManager.ProcessCommand($"/questinfo {questInfo.QuestId}"); + } } } @@ -259,9 +233,6 @@ internal sealed class QuestJournalUtils internal static void ShowFilterContextMenu(QuestJournalComponent journalUi) { - //IL_003c: Unknown result type (might be due to invalid IL or missing references) - //IL_0041: Unknown result type (might be due to invalid IL or missing references) - //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (ImGuiComponents.IconButton(FontAwesomeIcon.Filter)) { ImGui.OpenPopup("QuestFilters"); @@ -270,40 +241,32 @@ internal sealed class QuestJournalUtils { ImGui.SetTooltip("Filter Options"); } - PopupDisposable val = ImRaii.Popup((ImU8String)"QuestFilters"); - try + using ImRaii.PopupDisposable popupDisposable = ImRaii.Popup("QuestFilters"); + if (!(bool)popupDisposable) { - if (!PopupDisposable.op_Implicit(val)) - { - return; - } - if ((0u | (ImGui.Checkbox("Available Only", ref journalUi.Filter.AvailableOnly) ? 1u : 0u) | (ImGui.Checkbox("Hide Without Quest Paths", ref journalUi.Filter.HideNoPaths) ? 1u : 0u) | (ImGui.Checkbox("Hide Unobtainable", ref journalUi.Filter.HideUnobtainable) ? 1u : 0u)) != 0) + return; + } + if ((0u | (ImGui.Checkbox("Available Only", ref journalUi.Filter.AvailableOnly) ? 1u : 0u) | (ImGui.Checkbox("Hide Without Quest Paths", ref journalUi.Filter.HideNoPaths) ? 1u : 0u) | (ImGui.Checkbox("Hide Unobtainable", ref journalUi.Filter.HideUnobtainable) ? 1u : 0u)) != 0) + { + journalUi.UpdateFilter(); + } + if (journalUi.Filter.AdvancedFiltersActive) + { + ImGui.Separator(); + if (ImGui.Button("Clear Filters")) { + journalUi.Filter.AvailableOnly = false; + journalUi.Filter.HideNoPaths = false; + journalUi.Filter.HideUnobtainable = false; journalUi.UpdateFilter(); } - if (journalUi.Filter.AdvancedFiltersActive) - { - ImGui.Separator(); - if (ImGui.Button("Clear Filters")) - { - journalUi.Filter.AvailableOnly = false; - journalUi.Filter.HideNoPaths = false; - journalUi.Filter.HideUnobtainable = false; - journalUi.UpdateFilter(); - } - } - } - finally - { - ((PopupDisposable)(ref val)).Dispose(); } } public void AddAllAvailableQuests() { int num = _questRegistry.AllQuests.Count((Quest quest) => !quest.Root.Disabled && !_questFunctions.IsQuestRemoved(quest.Id) && _questFunctions.IsReadyToAcceptQuest(quest.Id) && !_questFunctions.IsQuestComplete(quest.Id) && !_questFunctions.IsQuestAccepted(quest.Id) && !quest.Info.IsRepeatable && quest.Info.AlliedSociety == EAlliedSociety.None && !(quest.Info is QuestInfo { MoogleDeliveryLevel: >0 }) && !_questController.ManualPriorityQuests.Any((Quest q) => q.Id.Equals(quest.Id))); - DisabledDisposable val = ImRaii.Disabled(num == 0); - try + using (ImRaii.Disabled(num == 0)) { if (ImGuiComponents.IconButton(FontAwesomeIcon.ListOl)) { @@ -312,10 +275,6 @@ internal sealed class QuestJournalUtils _chatGui.Print($"Added {num2} {value} to priority queue.", "Questionable", 576); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { object obj; diff --git a/Questionable/Questionable.Windows.JournalComponents/QuestRewardComponent.cs b/Questionable/Questionable.Windows.JournalComponents/QuestRewardComponent.cs index 6154a45..fe789b8 100644 --- a/Questionable/Questionable.Windows.JournalComponents/QuestRewardComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/QuestRewardComponent.cs @@ -35,34 +35,22 @@ internal sealed class QuestRewardComponent public void DrawItemRewards() { - //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) - TabItemDisposable val = ImRaii.TabItem((ImU8String)"Item Rewards"); - try + using ImRaii.TabItemDisposable tabItemDisposable = ImRaii.TabItem("Item Rewards"); + if (!(!tabItemDisposable)) { - if (!(!val)) - { - ImGui.Checkbox("Show rewards from seasonal event quests", ref _showEventRewards); - ImGui.Spacing(); - ImGui.BulletText("Only untradeable items are listed (e.g. the Wind-up Airship can be sold on the market board)."); - DrawGroup("Mounts", EItemRewardType.Mount); - DrawGroup("Minions", EItemRewardType.Minion); - DrawGroup("Orchestrion Rolls", EItemRewardType.OrchestrionRoll); - DrawGroup("Triple Triad Cards", EItemRewardType.TripleTriadCard); - DrawGroup("Fashion Accessories", EItemRewardType.FashionAccessory); - } - } - finally - { - ((TabItemDisposable)(ref val)).Dispose(); + ImGui.Checkbox("Show rewards from seasonal event quests", ref _showEventRewards); + ImGui.Spacing(); + ImGui.BulletText("Only untradeable items are listed (e.g. the Wind-up Airship can be sold on the market board)."); + DrawGroup("Mounts", EItemRewardType.Mount); + DrawGroup("Minions", EItemRewardType.Minion); + DrawGroup("Orchestrion Rolls", EItemRewardType.OrchestrionRoll); + DrawGroup("Triple Triad Cards", EItemRewardType.TripleTriadCard); + DrawGroup("Fashion Accessories", EItemRewardType.FashionAccessory); } } private void DrawGroup(string label, EItemRewardType type) { - //IL_0175: Unknown result type (might be due to invalid IL or missing references) - //IL_017a: Unknown result type (might be due to invalid IL or missing references) ImU8String label2 = new ImU8String(9, 2); label2.AppendFormatted(label); label2.AppendLiteral("###Reward"); @@ -94,30 +82,18 @@ internal sealed class QuestRewardComponent { continue; } - TooltipDisposable val = ImRaii.Tooltip(); - try + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (tooltipDisposable.Alive) { - if (((TooltipDisposable)(ref val)).Alive) + ImU8String text2 = new ImU8String(15, 1); + text2.AppendLiteral("Obtained from: "); + text2.AppendFormatted(questInfo.Name); + ImGui.Text(text2); + using (ImRaii.PushIndent()) { - ImU8String text2 = new ImU8String(15, 1); - text2.AppendLiteral("Obtained from: "); - text2.AppendFormatted(questInfo.Name); - ImGui.Text(text2); - IndentDisposable val2 = ImRaii.PushIndent(1, true); - try - { - _questTooltipComponent.DrawInner(questInfo, showItemRewards: false); - } - finally - { - ((IDisposable)val2)?.Dispose(); - } + _questTooltipComponent.DrawInner(questInfo, showItemRewards: false); } } - finally - { - ((TooltipDisposable)(ref val)).Dispose(); - } } } } diff --git a/Questionable/Questionable.Windows.QuestComponents/ARealmRebornComponent.cs b/Questionable/Questionable.Windows.QuestComponents/ARealmRebornComponent.cs index 67e306c..9fe65ed 100644 --- a/Questionable/Questionable.Windows.QuestComponents/ARealmRebornComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/ARealmRebornComponent.cs @@ -65,39 +65,28 @@ internal sealed class ARealmRebornComponent private void DrawPrimals() { - //IL_0050: Unknown result type (might be due to invalid IL or missing references) - //IL_0055: Unknown result type (might be due to invalid IL or missing references) bool flag = UIState.IsInstanceContentCompleted(RequiredPrimalInstances.Last()); bool flag2 = _uiUtils.ChecklistItem("Hard Mode Primals", flag, _configuration.Advanced.SkipARealmRebornHardModePrimals ? new System.Numerics.Vector4?(ImGuiColors.DalamudGrey) : ((System.Numerics.Vector4?)null)); if (flag || !flag2) { return; } - TooltipDisposable val = ImRaii.Tooltip(); - try + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (tooltipDisposable.Alive) { - if (((TooltipDisposable)(ref val)).Alive) + ushort[] requiredPrimalInstances = RequiredPrimalInstances; + foreach (ushort instanceId in requiredPrimalInstances) { - ushort[] requiredPrimalInstances = RequiredPrimalInstances; - foreach (ushort instanceId in requiredPrimalInstances) - { - (System.Numerics.Vector4 color, FontAwesomeIcon icon) instanceStyle = UiUtils.GetInstanceStyle(instanceId); - FFXIVClientStructs.FFXIV.Common.Math.Vector4 vector = instanceStyle.color; - FontAwesomeIcon item = instanceStyle.icon; - _uiUtils.ChecklistItem(_territoryData.GetInstanceName(instanceId) ?? "?", vector, item, ImGui.GetStyle().FramePadding.X); - } + (System.Numerics.Vector4 color, FontAwesomeIcon icon) instanceStyle = UiUtils.GetInstanceStyle(instanceId); + FFXIVClientStructs.FFXIV.Common.Math.Vector4 vector = instanceStyle.color; + FontAwesomeIcon item = instanceStyle.icon; + _uiUtils.ChecklistItem(_territoryData.GetInstanceName(instanceId) ?? "?", vector, item, ImGui.GetStyle().FramePadding.X); } } - finally - { - ((TooltipDisposable)(ref val)).Dispose(); - } } private void DrawAllianceRaids() { - //IL_005e: Unknown result type (might be due to invalid IL or missing references) - //IL_0063: Unknown result type (might be due to invalid IL or missing references) QuestFunctions questFunctions = _questFunctions; IReadOnlyList crystalTowerQuests = QuestData.CrystalTowerQuests; bool flag = questFunctions.IsQuestComplete(crystalTowerQuests[crystalTowerQuests.Count - 1]); @@ -106,24 +95,17 @@ internal sealed class ARealmRebornComponent { return; } - TooltipDisposable val = ImRaii.Tooltip(); - try + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (!tooltipDisposable.Alive) { - if (!((TooltipDisposable)(ref val)).Alive) - { - return; - } - foreach (QuestId crystalTowerQuest in QuestData.CrystalTowerQuests) - { - (System.Numerics.Vector4 Color, FontAwesomeIcon Icon, string Status) questStyle = _uiUtils.GetQuestStyle(crystalTowerQuest); - FFXIVClientStructs.FFXIV.Common.Math.Vector4 vector = questStyle.Color; - FontAwesomeIcon item = questStyle.Icon; - _uiUtils.ChecklistItem(_questData.GetQuestInfo(crystalTowerQuest).Name, vector, item, ImGui.GetStyle().FramePadding.X); - } + return; } - finally + foreach (QuestId crystalTowerQuest in QuestData.CrystalTowerQuests) { - ((TooltipDisposable)(ref val)).Dispose(); + (System.Numerics.Vector4 Color, FontAwesomeIcon Icon, string Status) questStyle = _uiUtils.GetQuestStyle(crystalTowerQuest); + FFXIVClientStructs.FFXIV.Common.Math.Vector4 vector = questStyle.Color; + FontAwesomeIcon item = questStyle.Icon; + _uiUtils.ChecklistItem(_questData.GetQuestInfo(crystalTowerQuest).Name, vector, item, ImGui.GetStyle().FramePadding.X); } } } diff --git a/Questionable/Questionable.Windows.QuestComponents/ActiveQuestComponent.cs b/Questionable/Questionable.Windows.QuestComponents/ActiveQuestComponent.cs index 340c4c3..e346762 100644 --- a/Questionable/Questionable.Windows.QuestComponents/ActiveQuestComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/ActiveQuestComponent.cs @@ -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 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 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 nextPriorityQuestsThatCanBeAccepted = _questFunctions.GetNextPriorityQuestsThatCanBeAccepted(); + List 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 nextPriorityQuestsThatCanBeAccepted = _questFunctions.GetNextPriorityQuestsThatCanBeAccepted(); - List 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 list2 = nextPriorityQuestsThatCanBeAccepted.Where((PriorityQuestInfo x) => !x.IsAvailable).ToList(); + if (list2.Count > 0) { - ImGui.BulletText("(none)"); - } - if (_configuration.Advanced.AdditionalStatusInformation) - { - List 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(out task); - val = ImRaii.Disabled(flag); - try + bool condition = currentStep != null && !flag && currentStep.InteractionType == EInteractionType.Instruction && _questController.HasCurrentTaskMatching(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) diff --git a/Questionable/Questionable.Windows.QuestComponents/EventInfoComponent.cs b/Questionable/Questionable.Windows.QuestComponents/EventInfoComponent.cs index 09f3b4c..a79c19d 100644 --- a/Questionable/Questionable.Windows.QuestComponents/EventInfoComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/EventInfoComponent.cs @@ -171,11 +171,10 @@ internal sealed class EventInfoComponent { continue; } - ImU8String imU8String = new ImU8String(21, 1); - imU8String.AppendLiteral("##EventQuestSelection"); - imU8String.AppendFormatted(questId); - IdDisposable val = ImRaii.PushId(imU8String, true); - try + ImU8String id = new ImU8String(21, 1); + id.AppendLiteral("##EventQuestSelection"); + id.AppendFormatted(questId); + using (ImRaii.PushId(id)) { string name = _questData.GetQuestInfo(questId).Name; if (list.Contains(questId) && _questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest)) @@ -204,10 +203,6 @@ internal sealed class EventInfoComponent } } } - finally - { - ((IDisposable)val)?.Dispose(); - } } } diff --git a/Questionable/Questionable.Windows.QuestComponents/ManualPriorityComponent.cs b/Questionable/Questionable.Windows.QuestComponents/ManualPriorityComponent.cs index dbbe752..efbab63 100644 --- a/Questionable/Questionable.Windows.QuestComponents/ManualPriorityComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/ManualPriorityComponent.cs @@ -57,9 +57,6 @@ internal sealed class ManualPriorityComponent public void Draw() { - //IL_00ab: 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_00b1: Unknown result type (might be due to invalid IL or missing references) ImGui.TextWrapped("When you have an active Main Scenario Quest, Questionable will prioritise quests in this order:"); ImGui.BulletText("Priority quests: class quests, A Realm Reborn primals and raids"); ImGui.BulletText("Supported quests from your Journal's To-Do list (always visible on-screen quests)"); @@ -73,34 +70,23 @@ internal sealed class ManualPriorityComponent { ImGui.Text("Priority queue (drag arrow buttons to reorder):"); } - ChildDisposable val = ImRaii.Child((ImU8String)"ManualPriorityList", new Vector2(-1f, -27f), true); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("ManualPriorityList", new Vector2(-1f, -27f), border: true)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { DrawQuestList(); } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } List list = ParseClipboardItems(); - DisabledDisposable val2 = ImRaii.Disabled(list.Count == 0); - try + using (ImRaii.Disabled(list.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Download, "Import from Clipboard")) { ImportFromClipboard(list); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } ImGui.SameLine(); - val2 = ImRaii.Disabled(_questController.ManualPriorityQuests.Count == 0); - try + using (ImRaii.Disabled(_questController.ManualPriorityQuests.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Upload, "Export to Clipboard")) { @@ -112,27 +98,18 @@ internal sealed class ManualPriorityComponent _questController.SavePriorityQuests(); } ImGui.SameLine(); - DisabledDisposable val3 = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) { _questController.ClearQuestPriority(); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Hold CTRL to enable this button."); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } } private void DrawQuestList() @@ -154,11 +131,10 @@ internal sealed class ManualPriorityComponent { Vector2 item = ImGui.GetCursorScreenPos() + new Vector2(0f, (0f - ImGui.GetStyle().ItemSpacing.Y) / 2f); Quest quest3 = manualPriorityQuests[i]; - ImU8String imU8String = new ImU8String(5, 1); - imU8String.AppendLiteral("Quest"); - imU8String.AppendFormatted(quest3.Id); - IdDisposable val = ImRaii.PushId(imU8String, true); - try + ImU8String id = new ImU8String(5, 1); + id.AppendLiteral("Quest"); + id.AppendFormatted(quest3.Id); + using (ImRaii.PushId(id)) { ImGui.AlignTextToFramePadding(); ImU8String text = new ImU8String(1, 1); @@ -184,15 +160,10 @@ internal sealed class ManualPriorityComponent } if (manualPriorityQuests.Count > 1) { - FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.ArrowsUpDown.ToIconString()).X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 4f - ImGui.GetStyle().ItemSpacing.X); } - finally - { - ((IDisposable)val2)?.Dispose(); - } if (_draggedItem == quest3.Id) { ImGuiComponents.IconButton("##Move", FontAwesomeIcon.ArrowsUpDown, ImGui.ColorConvertU32ToFloat4(ImGui.GetColorU32(ImGuiCol.ButtonActive))); @@ -209,25 +180,16 @@ internal sealed class ManualPriorityComponent } else { - FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } if (ImGuiComponents.IconButton($"##Remove{i}", FontAwesomeIcon.Times)) { quest = quest3; } } - finally - { - ((IDisposable)val)?.Dispose(); - } Vector2 item2 = new Vector2(item.X + x, ImGui.GetCursorScreenPos().Y - ImGui.GetStyle().ItemSpacing.Y + 2f); list.Add((item, item2)); } diff --git a/Questionable/Questionable.Windows.QuestComponents/PresetBuilderComponent.cs b/Questionable/Questionable.Windows.QuestComponents/PresetBuilderComponent.cs index 4b047c5..f741752 100644 --- a/Questionable/Questionable.Windows.QuestComponents/PresetBuilderComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/PresetBuilderComponent.cs @@ -77,38 +77,25 @@ internal sealed class PresetBuilderComponent public void Draw() { - //IL_002e: Unknown result type (might be due to invalid IL or missing references) - //IL_0033: Unknown result type (might be due to invalid IL or missing references) - //IL_0034: Unknown result type (might be due to invalid IL or missing references) ImGui.TextWrapped("Quest presets allow you to quickly add related quests to your priority list. These are useful for unlocking content that may be required later."); ImGui.Spacing(); - ChildDisposable val = ImRaii.Child((ImU8String)"PresetList", new Vector2(-1f, -27f), true); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("PresetList", new Vector2(-1f, -27f), border: true)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { DrawPresetGroups(); } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } List list = (from questId in GetAllPresetQuests() where _questController.ManualPriorityQuests.Any((Quest q) => q.Id.Equals(questId)) select questId).ToList(); - DisabledDisposable val2 = ImRaii.Disabled(list.Count == 0); - try + using (ImRaii.Disabled(list.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, $"Clear All Preset Quests ({list.Count})")) { ClearAllPresetQuests(list); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (list.Count == 0) @@ -144,8 +131,7 @@ internal sealed class PresetBuilderComponent QuestPreset value; if (DrawGroupHeader("Aether Currents", "Unlock aether currents in various expansion zones to enable flying.", orderedEnumerable)) { - IndentDisposable val = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { foreach (KeyValuePair item in orderedEnumerable) { @@ -155,15 +141,10 @@ internal sealed class PresetBuilderComponent DrawPreset(key2, preset); } } - finally - { - ((IDisposable)val)?.Dispose(); - } } if (DrawGroupHeader("City Aethernet", "Unlock aethernet shards in major cities to enable city teleports.", orderedEnumerable2)) { - IndentDisposable val2 = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { foreach (KeyValuePair item2 in orderedEnumerable2) { @@ -173,17 +154,12 @@ internal sealed class PresetBuilderComponent DrawPreset(key3, preset2); } } - finally - { - ((IDisposable)val2)?.Dispose(); - } } if (!orderedEnumerable3.Any() || !DrawGroupHeader("Content Unlocks", "Essential quest series and unlocks that may be required for progression.", orderedEnumerable3)) { return; } - IndentDisposable val3 = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { foreach (KeyValuePair item3 in orderedEnumerable3) { @@ -193,10 +169,6 @@ internal sealed class PresetBuilderComponent DrawPreset(key4, preset3); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } } private bool DrawGroupHeader(string groupName, string groupDescription, IEnumerable> presets) @@ -249,8 +221,7 @@ internal sealed class PresetBuilderComponent private void DrawPreset(string key, QuestPreset preset) { - IdDisposable val = ImRaii.PushId((ImU8String)key, true); - try + using (ImRaii.PushId(key)) { List availableQuestsForPreset = GetAvailableQuestsForPreset(preset); List completedQuestsForPreset = GetCompletedQuestsForPreset(preset); @@ -291,8 +262,7 @@ internal sealed class PresetBuilderComponent { return; } - IndentDisposable val2 = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { ImGui.TextWrapped(preset.Description); ImGui.Spacing(); @@ -392,14 +362,6 @@ internal sealed class PresetBuilderComponent _uiUtils.ChecklistItem("No applicable quests found", ImGuiColors.DalamudGrey, FontAwesomeIcon.Minus); goto IL_03d8; } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((IDisposable)val)?.Dispose(); } } diff --git a/Questionable/Questionable.Windows.QuestComponents/QuestSequenceComponent.cs b/Questionable/Questionable.Windows.QuestComponents/QuestSequenceComponent.cs index 669224d..0693f57 100644 --- a/Questionable/Questionable.Windows.QuestComponents/QuestSequenceComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/QuestSequenceComponent.cs @@ -62,33 +62,18 @@ internal sealed class QuestSequenceComponent ImGui.TextColored(new Vector4(0.98f, 0.98f, 1f, 1f), "Quest Sequence Viewer"); ImGui.SameLine(x - 35f); ImGui.SetCursorPosY(ImGui.GetCursorPosY() - num2 + ImGui.GetStyle().ItemSpacing.Y); - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true); - try + using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero)) { - ColorDisposable val2 = 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 val3 = 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.Times)) { isOpen = false; } } - finally - { - ((IDisposable)val3)?.Dispose(); - } } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((IDisposable)val)?.Dispose(); } ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY()); } @@ -146,40 +131,29 @@ internal sealed class QuestSequenceComponent windowDrawList.AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, y), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.2f)), 4f, ImDrawFlags.None, 1f); ImGui.SetCursorPosY(ImGui.GetCursorPosY() + ImGui.GetStyle().ItemSpacing.Y * 1.5f); ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 10f); - FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true); - try + using (ImRaii.PushFont(UiBuilder.IconFont)) { ImGui.TextColored(new Vector4(0.7f, 0.6f, 0.9f, 1f), FontAwesomeIcon.Search.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); float x2 = ImGui.GetStyle().ItemSpacing.X; float num = 10f; float num2 = 10f; float num3 = ImGui.CalcTextSize("Search").X + ImGui.CalcTextSize(FontAwesomeIcon.Search.ToIconString()).X + ImGui.GetStyle().FramePadding.X * 4f + x2; ImGui.SetNextItemWidth(x - num3 - x2 * 3f - num - num2); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f), true); - try + using (ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f))) { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.FrameBgHovered, new Vector4(0.12f, 0.1f, 0.18f, 0.9f), true); - try + using (ImRaii.PushColor(ImGuiCol.FrameBgHovered, new Vector4(0.12f, 0.1f, 0.18f, 0.9f))) { - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.FrameBgActive, new Vector4(0.15f, 0.13f, 0.22f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.FrameBgActive, new Vector4(0.15f, 0.13f, 0.22f, 1f))) { bool flag = ImGui.InputTextWithHint("##QuestLookup", "Enter quest ID...", ref _questLookupInput, 10, ImGuiInputTextFlags.EnterReturnsTrue); ImGui.SameLine(); - ColorDisposable val5 = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.25f, 0.22f, 0.32f, 0.8f), true); - try + using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.25f, 0.22f, 0.32f, 0.8f))) { - ColorDisposable val6 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f))) { - ColorDisposable val7 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.4f, 0.35f, 0.5f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.4f, 0.35f, 0.5f, 1f))) { bool flag2 = ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Search, "Search"); if (flag || flag2) @@ -194,34 +168,10 @@ internal sealed class QuestSequenceComponent } } } - finally - { - ((IDisposable)val7)?.Dispose(); - } - } - finally - { - ((IDisposable)val6)?.Dispose(); } } - finally - { - ((IDisposable)val5)?.Dispose(); - } - } - finally - { - ((IDisposable)val4)?.Dispose(); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); } ImGui.SetCursorPosY(ImGui.GetCursorPosY() + ImGui.GetStyle().ItemSpacing.Y * 1.5f); ImGui.Spacing(); @@ -305,14 +255,11 @@ internal sealed class QuestSequenceComponent ImGui.TextColored(in col, text); ImGui.SameLine(); ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f); - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.18f, 0.16f, 0.22f, 0.8f), true); - try + using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.18f, 0.16f, 0.22f, 0.8f))) { - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.28f, 0.24f, 0.32f, 0.95f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.28f, 0.24f, 0.32f, 0.95f))) { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.35f, 0.3f, 0.45f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.35f, 0.3f, 0.45f, 1f))) { if (ImGuiComponents.IconButton(FontAwesomeIcon.Copy)) { @@ -323,19 +270,7 @@ internal sealed class QuestSequenceComponent ImGui.SetTooltip("Copies filename as QuestID_QuestNameWithSpaces.json"); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } } - finally - { - ((IDisposable)val2)?.Dispose(); - } - } - finally - { - ((IDisposable)val)?.Dispose(); } if (currentSequence.HasValue) { @@ -431,115 +366,95 @@ internal sealed class QuestSequenceComponent private static void DrawSummaryCards(int totalSequences, int maxSeq, bool hasQuestPath, float coverage, Vector4 coverageColor, int implementedCount, int expectedCount) { - //IL_0046: Unknown result type (might be due to invalid IL or missing references) - //IL_004b: Unknown result type (might be due to invalid IL or missing references) - //IL_004c: Unknown result type (might be due to invalid IL or missing references) - TableDisposable val = ImRaii.Table((ImU8String)"SummaryCards", 2, ImGuiTableFlags.None); - try + using ImRaii.TableDisposable tableDisposable = ImRaii.Table("SummaryCards", 2, ImGuiTableFlags.None); + if (!tableDisposable) { - if (!val) + return; + } + ImGui.TableSetupColumn("GameData", ImGuiTableColumnFlags.WidthStretch, 0.4f); + ImGui.TableSetupColumn("QuestPath", ImGuiTableColumnFlags.WidthStretch, 0.6f); + ImGui.TableNextRow(); + ImGui.TableNextColumn(); + DrawCard(80f, new Vector4(0.6f, 0.85f, 1f, 1f), FontAwesomeIcon.Gamepad, "Expected Sequences", delegate + { + ImGui.Spacing(); + ImGui.Indent(10f); + Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f); + ImU8String text = new ImU8String(6, 0); + text.AppendLiteral("Count:"); + ImGui.TextColored(in col, text); + ImGui.SameLine(); + col = new Vector4(0.7f, 0.9f, 1f, 1f); + ImU8String text2 = new ImU8String(0, 1); + text2.AppendFormatted(totalSequences); + ImGui.TextColored(in col, text2); + ImGui.Spacing(); + col = new Vector4(0.9f, 0.9f, 0.98f, 1f); + ImU8String text3 = new ImU8String(6, 0); + text3.AppendLiteral("Range:"); + ImGui.TextColored(in col, text3); + ImGui.SameLine(); + col = new Vector4(0.7f, 0.9f, 1f, 1f); + ImU8String text4 = new ImU8String(9, 1); + text4.AppendLiteral("0 → "); + text4.AppendFormatted(maxSeq); + text4.AppendLiteral(", 255"); + ImGui.TextColored(in col, text4); + ImGui.Unindent(10f); + }); + ImGui.TableNextColumn(); + DrawCard(80f, new Vector4(0.5f, 1f, 0.6f, 1f), FontAwesomeIcon.Code, "Implementation Status", delegate + { + if (hasQuestPath) { - return; + ImGui.Indent(10f); + ImGui.TextColored(new Vector4(0.9f, 0.9f, 0.98f, 1f), "Progress:"); + ImGui.SameLine(); + ref Vector4 col = ref coverageColor; + ImU8String text = new ImU8String(0, 1); + text.AppendFormatted(implementedCount); + ImGui.TextColored(in col, text); + ImGui.SameLine(); + ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/"); + ImGui.SameLine(); + Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f); + ImU8String text2 = new ImU8String(0, 1); + text2.AppendFormatted(expectedCount); + ImGui.TextColored(in col2, text2); + ImGui.SameLine(); + ref Vector4 col3 = ref coverageColor; + ImU8String text3 = new ImU8String(3, 1); + text3.AppendLiteral("("); + text3.AppendFormatted(coverage, "F0"); + text3.AppendLiteral("%)"); + ImGui.TextColored(in col3, text3); + ImGui.Spacing(); + Vector2 cursorScreenPos = ImGui.GetCursorScreenPos(); + float x = ImGui.GetContentRegionAvail().X - 10f; + using (ImRaii.PushColor(ImGuiCol.PlotHistogram, coverageColor)) + { + using (ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f))) + { + ImGui.ProgressBar(coverage / 100f, new Vector2(x, 16f), ""); + } + } + ImGui.GetWindowDrawList().AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, 16f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.3f)), 2f); + ImGui.Unindent(10f); } - ImGui.TableSetupColumn("GameData", ImGuiTableColumnFlags.WidthStretch, 0.4f); - ImGui.TableSetupColumn("QuestPath", ImGuiTableColumnFlags.WidthStretch, 0.6f); - ImGui.TableNextRow(); - ImGui.TableNextColumn(); - DrawCard(80f, new Vector4(0.6f, 0.85f, 1f, 1f), FontAwesomeIcon.Gamepad, "Expected Sequences", delegate + else { ImGui.Spacing(); ImGui.Indent(10f); - Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f); - ImU8String text = new ImU8String(6, 0); - text.AppendLiteral("Count:"); - ImGui.TextColored(in col, text); + ImGui.PushFont(UiBuilder.IconFont); + ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), FontAwesomeIcon.Ban.ToIconString()); + ImGui.PopFont(); ImGui.SameLine(); - col = new Vector4(0.7f, 0.9f, 1f, 1f); - ImU8String text2 = new ImU8String(0, 1); - text2.AppendFormatted(totalSequences); - ImGui.TextColored(in col, text2); + ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), "Not Implemented"); ImGui.Spacing(); - col = new Vector4(0.9f, 0.9f, 0.98f, 1f); - ImU8String text3 = new ImU8String(6, 0); - text3.AppendLiteral("Range:"); - ImGui.TextColored(in col, text3); - ImGui.SameLine(); - col = new Vector4(0.7f, 0.9f, 1f, 1f); - ImU8String text4 = new ImU8String(9, 1); - text4.AppendLiteral("0 → "); - text4.AppendFormatted(maxSeq); - text4.AppendLiteral(", 255"); - ImGui.TextColored(in col, text4); + ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "No quest path data available"); ImGui.Unindent(10f); - }); - ImGui.TableNextColumn(); - DrawCard(80f, new Vector4(0.5f, 1f, 0.6f, 1f), FontAwesomeIcon.Code, "Implementation Status", delegate - { - if (hasQuestPath) - { - ImGui.Indent(10f); - ImGui.TextColored(new Vector4(0.9f, 0.9f, 0.98f, 1f), "Progress:"); - ImGui.SameLine(); - ref Vector4 col = ref coverageColor; - ImU8String text = new ImU8String(0, 1); - text.AppendFormatted(implementedCount); - ImGui.TextColored(in col, text); - ImGui.SameLine(); - ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/"); - ImGui.SameLine(); - Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f); - ImU8String text2 = new ImU8String(0, 1); - text2.AppendFormatted(expectedCount); - ImGui.TextColored(in col2, text2); - ImGui.SameLine(); - ref Vector4 col3 = ref coverageColor; - ImU8String text3 = new ImU8String(3, 1); - text3.AppendLiteral("("); - text3.AppendFormatted(coverage, "F0"); - text3.AppendLiteral("%)"); - ImGui.TextColored(in col3, text3); - ImGui.Spacing(); - Vector2 cursorScreenPos = ImGui.GetCursorScreenPos(); - float x = ImGui.GetContentRegionAvail().X - 10f; - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.PlotHistogram, coverageColor, true); - try - { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f), true); - try - { - ImGui.ProgressBar(coverage / 100f, new Vector2(x, 16f), ""); - } - finally - { - ((IDisposable)val3)?.Dispose(); - } - } - finally - { - ((IDisposable)val2)?.Dispose(); - } - ImGui.GetWindowDrawList().AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, 16f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.3f)), 2f); - ImGui.Unindent(10f); - } - else - { - ImGui.Spacing(); - ImGui.Indent(10f); - ImGui.PushFont(UiBuilder.IconFont); - ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), FontAwesomeIcon.Ban.ToIconString()); - ImGui.PopFont(); - ImGui.SameLine(); - ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), "Not Implemented"); - ImGui.Spacing(); - ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "No quest path data available"); - ImGui.Unindent(10f); - } - }); - } - finally - { - ((TableDisposable)(ref val)).Dispose(); - } + } + }); } private static void DrawCard(float height, Vector4 accentColor, FontAwesomeIcon icon, string title, System.Action content) @@ -564,100 +479,58 @@ internal sealed class QuestSequenceComponent private void DrawSequenceGrid(int maxSeq, byte? currentSequence, HashSet implementedSequences, Dictionary sequenceDetails, bool hasEndSequence) { - //IL_0092: 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_0099: 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) - //IL_0100: Unknown result type (might be due to invalid IL or missing references) - //IL_0102: Unknown result type (might be due to invalid IL or missing references) int val = maxSeq + 2; float x = ImGui.GetContentRegionAvail().X; int val2 = Math.Max(4, Math.Min(8, (int)(x / 100f))); val2 = Math.Min(val2, val); float y = ImGui.GetContentRegionAvail().Y; - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ChildBg, new Vector4(0.08f, 0.06f, 0.12f, 0.6f), true); - try + using (ImRaii.PushColor(ImGuiCol.ChildBg, new Vector4(0.08f, 0.06f, 0.12f, 0.6f))) { - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.Border, new Vector4(0.6f, 0.5f, 0.8f, 0.2f), true); - try + using (ImRaii.PushColor(ImGuiCol.Border, new Vector4(0.6f, 0.5f, 0.8f, 0.2f))) { - ChildDisposable val5 = ImRaii.Child((ImU8String)"SequenceGrid", new Vector2(-1f, y), true, ImGuiWindowFlags.None); - try + using ImRaii.ChildDisposable childDisposable = ImRaii.Child("SequenceGrid", new Vector2(-1f, y), border: true, ImGuiWindowFlags.None); + if (!(bool)childDisposable) { - if (!ChildDisposable.op_Implicit(val5)) + return; + } + using (ImRaii.PushColor(ImGuiCol.TableBorderStrong, new Vector4(0.6f, 0.5f, 0.8f, 0.2f))) + { + using (ImRaii.PushColor(ImGuiCol.TableBorderLight, new Vector4(0.6f, 0.5f, 0.8f, 0.15f))) { - return; - } - ColorDisposable val6 = ImRaii.PushColor(ImGuiCol.TableBorderStrong, new Vector4(0.6f, 0.5f, 0.8f, 0.2f), true); - try - { - ColorDisposable val7 = ImRaii.PushColor(ImGuiCol.TableBorderLight, new Vector4(0.6f, 0.5f, 0.8f, 0.15f), true); - try + using ImRaii.TableDisposable tableDisposable = ImRaii.Table("SequenceGridTable", val2, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingStretchSame); + if (!(bool)tableDisposable) { - TableDisposable val8 = ImRaii.Table((ImU8String)"SequenceGridTable", val2, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingStretchSame); - try - { - if (!TableDisposable.op_Implicit(val8)) - { - return; - } - int num = 0; - for (int i = 0; i <= maxSeq; i++) - { - if (num % val2 == 0) - { - ImGui.TableNextRow(); - } - ImGui.TableNextColumn(); - DrawSequenceCell(i, currentSequence, implementedSequences, sequenceDetails); - num++; - } - if (num % val2 == 0) - { - ImGui.TableNextRow(); - } - ImGui.TableNextColumn(); - DrawSequenceCell(255, currentSequence, implementedSequences, sequenceDetails, hasEndSequence); - for (num++; num % val2 != 0; num++) - { - ImGui.TableNextColumn(); - } - } - finally - { - ((TableDisposable)(ref val8)).Dispose(); - } + return; } - finally + int num = 0; + for (int i = 0; i <= maxSeq; i++) { - ((IDisposable)val7)?.Dispose(); + if (num % val2 == 0) + { + ImGui.TableNextRow(); + } + ImGui.TableNextColumn(); + DrawSequenceCell(i, currentSequence, implementedSequences, sequenceDetails); + num++; + } + if (num % val2 == 0) + { + ImGui.TableNextRow(); + } + ImGui.TableNextColumn(); + DrawSequenceCell(255, currentSequence, implementedSequences, sequenceDetails, hasEndSequence); + for (num++; num % val2 != 0; num++) + { + ImGui.TableNextColumn(); } } - finally - { - ((IDisposable)val6)?.Dispose(); - } - } - finally - { - ((ChildDisposable)(ref val5)).Dispose(); } } - finally - { - ((IDisposable)val4)?.Dispose(); - } - } - finally - { - ((IDisposable)val3)?.Dispose(); } } private void DrawSequenceCell(int sequenceId, byte? currentSequence, HashSet implementedSequences, Dictionary sequenceDetails, bool? forcedImplemented = null) { - //IL_035b: Unknown result type (might be due to invalid IL or missing references) - //IL_0360: Unknown result type (might be due to invalid IL or missing references) bool flag = currentSequence.HasValue && sequenceId == currentSequence.Value; bool flag2 = forcedImplemented ?? implementedSequences.Contains(sequenceId); bool flag3 = _hoveredSequenceId == sequenceId; @@ -701,21 +574,15 @@ internal sealed class QuestSequenceComponent if (ImGui.IsItemHovered()) { _hoveredSequenceId = sequenceId; - TooltipDisposable val = ImRaii.Tooltip(); - try + using (ImRaii.Tooltip()) { - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f), true); - try + using (ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f))) { ImU8String text2 = new ImU8String(9, 1); text2.AppendLiteral("Sequence "); text2.AppendFormatted(sequenceId); ImGui.Text(text2); } - finally - { - ((IDisposable)val2)?.Dispose(); - } ImGui.Separator(); if (flag2 && sequenceDetails.TryGetValue(sequenceId, out (int, string) value)) { @@ -760,10 +627,6 @@ internal sealed class QuestSequenceComponent ImGui.TextColored(new Vector4(1f, 0.85f, 0.5f, 1f), "► Currently Active"); } } - finally - { - ((TooltipDisposable)(ref val)).Dispose(); - } } else if (_hoveredSequenceId == sequenceId) { diff --git a/Questionable/Questionable.Windows.QuestComponents/QuestTooltipComponent.cs b/Questionable/Questionable.Windows.QuestComponents/QuestTooltipComponent.cs index ade06b9..ac03f0c 100644 --- a/Questionable/Questionable.Windows.QuestComponents/QuestTooltipComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/QuestTooltipComponent.cs @@ -1,4 +1,3 @@ -using System; using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; using Dalamud.Interface; @@ -39,19 +38,10 @@ internal sealed class QuestTooltipComponent public void Draw(IQuestInfo questInfo) { - //IL_0000: Unknown result type (might be due to invalid IL or missing references) - //IL_0005: Unknown result type (might be due to invalid IL or missing references) - TooltipDisposable val = ImRaii.Tooltip(); - try + using ImRaii.TooltipDisposable tooltipDisposable = ImRaii.Tooltip(); + if (tooltipDisposable.Alive) { - if (((TooltipDisposable)(ref val)).Alive) - { - DrawInner(questInfo, showItemRewards: true); - } - } - finally - { - ((TooltipDisposable)(ref val)).Dispose(); + DrawInner(questInfo, showItemRewards: true); } } @@ -153,15 +143,10 @@ internal sealed class QuestTooltipComponent } else { - DisabledDisposable val = ImRaii.Disabled(); - try + using (ImRaii.Disabled()) { _uiUtils.ChecklistItem($"Unknown Quest ({previousQuest.QuestId})", ImGuiColors.DalamudGrey, FontAwesomeIcon.Question); } - finally - { - ((IDisposable)val)?.Dispose(); - } } } } diff --git a/Questionable/Questionable.Windows.QuestComponents/QuestValidationComponent.cs b/Questionable/Questionable.Windows.QuestComponents/QuestValidationComponent.cs index e3074a4..1f74105 100644 --- a/Questionable/Questionable.Windows.QuestComponents/QuestValidationComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/QuestValidationComponent.cs @@ -55,26 +55,20 @@ internal sealed class QuestValidationComponent ImGui.SameLine(); ImGui.Text("("); ImGui.SameLine(); - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImU8String text2 = new ImU8String(7, 1); text2.AppendFormatted(errorCount); text2.AppendLiteral(" errors"); ImGui.Text(text2); } - finally - { - ((IDisposable)val)?.Dispose(); - } } if (num > 0) { if (errorCount > 0) { ImGui.SameLine(); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) { ImU8String text3 = new ImU8String(12, 1); text3.AppendLiteral(", "); @@ -83,16 +77,11 @@ internal sealed class QuestValidationComponent ImGui.Text(text3); return; } - finally - { - ((IDisposable)val2)?.Dispose(); - } } ImGui.SameLine(); ImGui.Text("("); ImGui.SameLine(); - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange)) { ImU8String text4 = new ImU8String(10, 1); text4.AppendFormatted(num); @@ -100,10 +89,6 @@ internal sealed class QuestValidationComponent ImGui.Text(text4); return; } - finally - { - ((IDisposable)val3)?.Dispose(); - } } if (errorCount > 0) { @@ -114,32 +99,22 @@ internal sealed class QuestValidationComponent private void DrawValidationTable() { - //IL_0010: Unknown result type (might be due to invalid IL or missing references) - //IL_0015: Unknown result type (might be due to invalid IL or missing references) - //IL_0016: Unknown result type (might be due to invalid IL or missing references) - TableDisposable val = ImRaii.Table((ImU8String)"ValidationIssues", 6, ImGuiTableFlags.Borders | ImGuiTableFlags.Sortable | ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY); - try + using ImRaii.TableDisposable tableDisposable = ImRaii.Table("ValidationIssues", 6, ImGuiTableFlags.Borders | ImGuiTableFlags.Sortable | ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY); + if (!(!tableDisposable)) { - if (!(!val)) + ImGui.TableSetupColumn("ID", ImGuiTableColumnFlags.WidthFixed, 60f); + ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthFixed, 250f); + ImGui.TableSetupColumn("Seq", ImGuiTableColumnFlags.WidthFixed, 40f); + ImGui.TableSetupColumn("Step", ImGuiTableColumnFlags.WidthFixed, 40f); + ImGui.TableSetupColumn("Issue", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, 60f); + ImGui.TableHeadersRow(); + IReadOnlyList issues = _questValidator.Issues; + for (int i = 0; i < issues.Count; i++) { - ImGui.TableSetupColumn("ID", ImGuiTableColumnFlags.WidthFixed, 60f); - ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthFixed, 250f); - ImGui.TableSetupColumn("Seq", ImGuiTableColumnFlags.WidthFixed, 40f); - ImGui.TableSetupColumn("Step", ImGuiTableColumnFlags.WidthFixed, 40f); - ImGui.TableSetupColumn("Issue", ImGuiTableColumnFlags.WidthStretch); - ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, 60f); - ImGui.TableHeadersRow(); - IReadOnlyList issues = _questValidator.Issues; - for (int i = 0; i < issues.Count; i++) - { - DrawValidationRow(issues[i], i); - } + DrawValidationRow(issues[i], i); } } - finally - { - ((TableDisposable)(ref val)).Dispose(); - } } private void DrawValidationRow(ValidationIssue issue, int index) @@ -161,15 +136,10 @@ internal sealed class QuestValidationComponent } else { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudGrey2, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudGrey2)) { ImGui.TextUnformatted("\ufffd"); } - finally - { - ((IDisposable)val)?.Dispose(); - } } } if (ImGui.TableNextColumn()) @@ -180,15 +150,10 @@ internal sealed class QuestValidationComponent } else { - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudGrey2, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudGrey2)) { ImGui.TextUnformatted("\ufffd"); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } } if (ImGui.TableNextColumn()) @@ -203,31 +168,21 @@ internal sealed class QuestValidationComponent private void DrawIssueCell(ValidationIssue issue, int index) { - Vector4 vector = ((issue.Severity == EIssueSeverity.Error) ? ImGuiColors.DalamudRed : ImGuiColors.DalamudOrange); + Vector4 color = ((issue.Severity == EIssueSeverity.Error) ? ImGuiColors.DalamudRed : ImGuiColors.DalamudOrange); FontAwesomeIcon icon = ((issue.Severity == EIssueSeverity.Error) ? FontAwesomeIcon.ExclamationTriangle : FontAwesomeIcon.InfoCircle); using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push()) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, vector, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, color)) { ImGui.TextUnformatted(icon.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } } ImGui.SameLine(); string issueSummary = GetIssueSummary(issue); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, vector, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, color)) { ImGui.TextWrapped(issueSummary); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } private void DrawActionsCell(ValidationIssue issue, int index) diff --git a/Questionable/Questionable.Windows.QuestComponents/QuickAccessButtonsComponent.cs b/Questionable/Questionable.Windows.QuestComponents/QuickAccessButtonsComponent.cs index 61ccf21..ab56914 100644 --- a/Questionable/Questionable.Windows.QuestComponents/QuickAccessButtonsComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/QuickAccessButtonsComponent.cs @@ -69,18 +69,13 @@ internal sealed class QuickAccessButtonsComponent private void DrawRebuildNavmeshButton() { bool flag = _commandManager.Commands.ContainsKey("/vnav"); - DisabledDisposable val = ImRaii.Disabled(!flag || !ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(!flag || !ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.GlobeEurope, "Rebuild Navmesh")) { _commandManager.ProcessCommand("/vnav rebuild"); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (!flag) @@ -123,8 +118,7 @@ internal sealed class QuickAccessButtonsComponent return; } int num2 = ((validationErrorCount == 0 || num == 0) ? 1 : 2); - IdDisposable val = ImRaii.PushId((ImU8String)"validationissues", true); - try + using (ImRaii.PushId("validationissues")) { FontAwesomeIcon icon = FontAwesomeIcon.ExclamationTriangle; FontAwesomeIcon icon2 = FontAwesomeIcon.InfoCircle; @@ -176,9 +170,5 @@ internal sealed class QuickAccessButtonsComponent _questValidationWindow.IsOpenAndUncollapsed = true; } } - finally - { - ((IDisposable)val)?.Dispose(); - } } } diff --git a/Questionable/Questionable.Windows.QuestComponents/SavedPresetsComponent.cs b/Questionable/Questionable.Windows.QuestComponents/SavedPresetsComponent.cs index 1d5ede9..4871f43 100644 --- a/Questionable/Questionable.Windows.QuestComponents/SavedPresetsComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/SavedPresetsComponent.cs @@ -87,32 +87,23 @@ internal sealed class SavedPresetsComponent public void Draw() { - //IL_0039: Unknown result type (might be due to invalid IL or missing references) - //IL_003e: Unknown result type (might be due to invalid IL or missing references) - //IL_003f: Unknown result type (might be due to invalid IL or missing references) ImGui.TextWrapped("Save your current priority queue as a preset for quick access later. Saved presets are stored in your configuration and persist between sessions."); ImGui.Spacing(); DrawSaveSection(); ImGui.Spacing(); - ChildDisposable val = ImRaii.Child((ImU8String)"SavedPresetsList", new Vector2(-1f, -27f), true); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("SavedPresetsList", new Vector2(-1f, -27f), border: true)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { DrawSavedPresets(); } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } DrawBottomButtons(); } private void DrawSaveSection() { int count = _questController.ManualPriorityQuests.Count; - DisabledDisposable val; if (_showSaveDialog) { ImGui.Text("Save Current Priority Queue as Preset:"); @@ -122,18 +113,13 @@ internal sealed class SavedPresetsComponent ImGui.SetNextItemWidth(250f); ImGui.InputTextWithHint("##PresetDescription", "Description (optional)...", ref _newPresetDescription, 256); ImGui.SameLine(); - val = ImRaii.Disabled(string.IsNullOrWhiteSpace(_newPresetName) || count == 0); - try + using (ImRaii.Disabled(string.IsNullOrWhiteSpace(_newPresetName) || count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Save, "Save")) { SaveCurrentPreset(); } } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.SameLine(); if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Times, "Cancel")) { @@ -147,18 +133,13 @@ internal sealed class SavedPresetsComponent } return; } - val = ImRaii.Disabled(count == 0); - try + using (ImRaii.Disabled(count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, $"Save Current Queue ({count} quests)")) { _showSaveDialog = true; } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (count == 0 && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Add quests to the priority queue first to save them as a preset."); @@ -192,8 +173,7 @@ internal sealed class SavedPresetsComponent private void DrawPresetEntry(string key, Configuration.SavedQuestPreset preset) { - IdDisposable val = ImRaii.PushId((ImU8String)key, true); - try + using (ImRaii.PushId(key)) { List availableQuests = GetAvailableQuests(preset.QuestIds); List completedQuests = GetCompletedQuests(preset.QuestIds); @@ -224,10 +204,8 @@ internal sealed class SavedPresetsComponent if (ImGui.CollapsingHeader(label, flag ? ImGuiTreeNodeFlags.DefaultOpen : ImGuiTreeNodeFlags.None)) { _expandedPreset = key; - IndentDisposable val2 = ImRaii.PushIndent(1, true); - try + using (ImRaii.PushIndent()) { - DisabledDisposable val3; if (_renamingPresetKey == key) { ImGui.Text("Name:"); @@ -238,18 +216,13 @@ internal sealed class SavedPresetsComponent ImGui.SameLine(); ImGui.SetNextItemWidth(300f); ImGui.InputTextWithHint("##EditDescription", "Description (optional)...", ref _renamePresetDescription, 256); - val3 = ImRaii.Disabled(string.IsNullOrWhiteSpace(_renamePresetName)); - try + using (ImRaii.Disabled(string.IsNullOrWhiteSpace(_renamePresetName))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Save Changes")) { RenamePreset(key, _renamePresetName, _renamePresetDescription); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } ImGui.SameLine(); if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Times, "Cancel")) { @@ -273,18 +246,13 @@ internal sealed class SavedPresetsComponent ImGui.TextColored(in col, text2); } ImGui.Spacing(); - val3 = ImRaii.Disabled(availableQuests.Count == 0); - try + using (ImRaii.Disabled(availableQuests.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, $"Add Available ({availableQuests.Count})")) { AddPresetToPriority(availableQuests); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (availableQuests.Count == 0) @@ -301,18 +269,13 @@ internal sealed class SavedPresetsComponent } } ImGui.SameLine(); - val3 = ImRaii.Disabled(alreadyPriorityQuests.Count == 0); - try + using (ImRaii.Disabled(alreadyPriorityQuests.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Minus, $"Remove from Priority ({alreadyPriorityQuests.Count})")) { RemovePresetFromPriority(alreadyPriorityQuests); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (alreadyPriorityQuests.Count == 0) @@ -337,8 +300,7 @@ internal sealed class SavedPresetsComponent ImGui.SetTooltip("Export this preset to clipboard for sharing."); } ImGui.SameLine(); - val3 = ImRaii.Disabled(_renamingPresetKey != null); - try + using (ImRaii.Disabled(_renamingPresetKey != null)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Pen, "Edit")) { @@ -347,28 +309,19 @@ internal sealed class SavedPresetsComponent _renamePresetDescription = preset.Description; } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Edit preset name and description."); } ImGui.SameLine(); int count = _questController.ManualPriorityQuests.Count; - val3 = ImRaii.Disabled(count == 0); - try + using (ImRaii.Disabled(count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Sync, "Update")) { UpdatePresetQuests(key, preset); } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (count == 0) @@ -385,18 +338,13 @@ internal sealed class SavedPresetsComponent } } ImGui.SameLine(); - val3 = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Delete")) { _presetToDelete = key; } } - finally - { - ((IDisposable)val3)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Hold CTRL to delete this preset."); @@ -430,10 +378,6 @@ internal sealed class SavedPresetsComponent } ImGui.Spacing(); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } else if (_expandedPreset == key) { @@ -446,69 +390,49 @@ internal sealed class SavedPresetsComponent ImGui.EndTooltip(); } } - finally - { - ((IDisposable)val)?.Dispose(); - } } private void DrawBottomButtons() { PresetExportData presetExportData = ParseClipboardPreset(); List list = ParseClipboardAllPresets(); - DisabledDisposable val = ImRaii.Disabled(presetExportData == null); - try + using (ImRaii.Disabled(presetExportData == null)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Download, "Import Preset") && presetExportData != null) { ImportPresetFromClipboard(presetExportData); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (presetExportData == null && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Copy a valid preset string to clipboard first."); } ImGui.SameLine(); - val = ImRaii.Disabled(list == null || list.Count == 0); - try + using (ImRaii.Disabled(list == null || list.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.FileImport, "Import All" + ((list != null && list.Count > 0) ? $" ({list.Count})" : "")) && list != null) { ImportAllPresetsFromClipboard(list); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if ((list == null || list.Count == 0) && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("Copy a valid 'all presets' export string to clipboard first."); } ImGui.SameLine(); - val = ImRaii.Disabled(_configuration.General.SavedPresets.Count == 0); - try + using (ImRaii.Disabled(_configuration.General.SavedPresets.Count == 0)) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.FileExport, $"Export All ({_configuration.General.SavedPresets.Count})")) { ExportAllPresetsToClipboard(); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (_configuration.General.SavedPresets.Count == 0 && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { ImGui.SetTooltip("No saved presets to export."); } ImGui.SameLine(); - val = ImRaii.Disabled(_configuration.General.SavedPresets.Count == 0 || !ImGui.IsKeyDown(ImGuiKey.ModCtrl)); - try + using (ImRaii.Disabled(_configuration.General.SavedPresets.Count == 0 || !ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All")) { @@ -517,10 +441,6 @@ internal sealed class SavedPresetsComponent _logger.LogInformation("Cleared all saved presets"); } } - finally - { - ((IDisposable)val)?.Dispose(); - } if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) { if (_configuration.General.SavedPresets.Count == 0) diff --git a/Questionable/Questionable.Windows.QuestComponents/ValidationDetailsRenderer.cs b/Questionable/Questionable.Windows.QuestComponents/ValidationDetailsRenderer.cs index 24828ab..d90dce0 100644 --- a/Questionable/Questionable.Windows.QuestComponents/ValidationDetailsRenderer.cs +++ b/Questionable/Questionable.Windows.QuestComponents/ValidationDetailsRenderer.cs @@ -111,23 +111,17 @@ internal sealed class ValidationDetailsRenderer private void DrawIssueDetails(ValidationIssue issue) { - Vector4 vector = ((issue.Severity == EIssueSeverity.Error) ? ImGuiColors.DalamudRed : ImGuiColors.DalamudOrange); + Vector4 color = ((issue.Severity == EIssueSeverity.Error) ? ImGuiColors.DalamudRed : ImGuiColors.DalamudOrange); FontAwesomeIcon icon = ((issue.Severity == EIssueSeverity.Error) ? FontAwesomeIcon.ExclamationTriangle : FontAwesomeIcon.InfoCircle); using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push()) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, vector, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, color)) { ImGui.TextUnformatted(icon.ToIconString()); } - finally - { - ((IDisposable)val)?.Dispose(); - } } ImGui.SameLine(); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, vector, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, color)) { ImU8String text = new ImU8String(2, 2); text.AppendFormatted(issue.Severity); @@ -135,10 +129,6 @@ internal sealed class ValidationDetailsRenderer text.AppendFormatted(issue.Type); ImGui.Text(text); } - finally - { - ((IDisposable)val2)?.Dispose(); - } ImGui.Separator(); if (issue.ElementId != null) { @@ -204,39 +194,24 @@ internal sealed class ValidationDetailsRenderer } else if (text.StartsWith("JSON parsing error", StringComparison.Ordinal)) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImGui.TextWrapped(text); } - finally - { - ((IDisposable)val)?.Dispose(); - } } else if (text.StartsWith("This usually indicates", StringComparison.Ordinal) || text.StartsWith("Please check", StringComparison.Ordinal)) { - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen)) { ImGui.TextWrapped(text); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } else if (text.StartsWith("\ufffd ", StringComparison.Ordinal)) { - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) { ImGui.TextWrapped(text); } - finally - { - ((IDisposable)val3)?.Dispose(); - } } else { @@ -278,9 +253,8 @@ internal sealed class ValidationDetailsRenderer for (int num = 0; num < list.Count; num++) { string value = list[num]; - Vector4 vector = array2[num % array2.Length]; - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, vector, true); - try + Vector4 color = array2[num % array2.Length]; + using (ImRaii.PushColor(ImGuiCol.Text, color)) { if (ElementId.TryFromString(value, out ElementId elementId) && elementId != null) { @@ -311,10 +285,6 @@ internal sealed class ValidationDetailsRenderer ImGui.TextWrapped(text3); } } - finally - { - ((IDisposable)val)?.Dispose(); - } } ImGui.Unindent(); } @@ -348,8 +318,7 @@ internal sealed class ValidationDetailsRenderer private void DrawJsonValidationError(JsonValidationError error, int index) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) { ImU8String text = new ImU8String(8, 1); text.AppendLiteral("Error #"); @@ -357,25 +326,16 @@ internal sealed class ValidationDetailsRenderer text.AppendLiteral(":"); ImGui.Text(text); } - finally - { - ((IDisposable)val)?.Dispose(); - } ImGui.Indent(12f); if (!string.IsNullOrEmpty(error.Path)) { ImGui.AlignTextToFramePadding(); ImGui.Text("Location:"); ImGui.SameLine(); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue)) { ImGui.TextWrapped(FormatJsonPath(error.Path)); } - finally - { - ((IDisposable)val2)?.Dispose(); - } } if (error.Messages.Count > 0) { @@ -384,8 +344,7 @@ internal sealed class ValidationDetailsRenderer foreach (string message in error.Messages) { ImGui.Indent(12f); - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { string text2 = CleanJsonText(message); if (string.Equals(text2, "validation failed", StringComparison.OrdinalIgnoreCase)) @@ -398,18 +357,13 @@ internal sealed class ValidationDetailsRenderer ImGui.TextWrapped(text3); ImGui.Unindent(12f); } - finally - { - ((IDisposable)val3)?.Dispose(); - } } } List validationSuggestions = GetValidationSuggestions(error); if (validationSuggestions.Count > 0) { ImGui.Spacing(); - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen)) { ImGui.Text("Suggestions:"); foreach (string item in validationSuggestions) @@ -417,33 +371,19 @@ internal sealed class ValidationDetailsRenderer ImGui.Indent(12f); using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push()) { - ColorDisposable val5 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow)) { ImGui.Text(FontAwesomeIcon.Lightbulb.ToIconString()); } - finally - { - ((IDisposable)val5)?.Dispose(); - } } ImGui.SameLine(); - ColorDisposable val6 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen)) { ImGui.TextWrapped(item); ImGui.Unindent(12f); } - finally - { - ((IDisposable)val6)?.Dispose(); - } } } - finally - { - ((IDisposable)val4)?.Dispose(); - } } ImGui.Unindent(12f); } @@ -455,15 +395,10 @@ internal sealed class ValidationDetailsRenderer { if (text.StartsWith("JSON Validation failed:", StringComparison.Ordinal)) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImGui.TextWrapped(text); } - finally - { - ((IDisposable)val)?.Dispose(); - } } else if (text.StartsWith(" - ", StringComparison.Ordinal)) { @@ -478,39 +413,24 @@ internal sealed class ValidationDetailsRenderer } ImGui.Text("\ufffd"); ImGui.SameLine(); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue)) { ImGui.Text(FormatJsonPath(path)); } - finally - { - ((IDisposable)val2)?.Dispose(); - } ImGui.SameLine(); ImGui.Text(":"); ImGui.SameLine(); - ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImGui.TextWrapped(text2); } - finally - { - ((IDisposable)val3)?.Dispose(); - } } else { - ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImGui.TextWrapped(CleanJsonText(text)); } - finally - { - ((IDisposable)val4)?.Dispose(); - } } } else @@ -621,30 +541,20 @@ internal sealed class ValidationDetailsRenderer } else if (text.StartsWith("Error:", StringComparison.Ordinal) || text.StartsWith("Invalid", StringComparison.Ordinal) || text.StartsWith("Missing", StringComparison.Ordinal)) { - ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed)) { ImGui.TextWrapped(text); } - finally - { - ((IDisposable)val)?.Dispose(); - } } else if (text.Contains(':', StringComparison.Ordinal)) { int num = text.IndexOf(':', StringComparison.Ordinal); string text2 = text.Substring(0, num); string text3 = text.Substring(num + 1).TrimStart(); - ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue, true); - try + using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue)) { ImGui.Text(text2 + ":"); } - finally - { - ((IDisposable)val2)?.Dispose(); - } ImGui.SameLine(); ImGui.TextWrapped(text3); } diff --git a/Questionable/Questionable.Windows.Utils/QuestSelector.cs b/Questionable/Questionable.Windows.Utils/QuestSelector.cs index 9be2d93..7ee6763 100644 --- a/Questionable/Questionable.Windows.Utils/QuestSelector.cs +++ b/Questionable/Questionable.Windows.Utils/QuestSelector.cs @@ -24,9 +24,6 @@ internal sealed class QuestSelector(QuestRegistry questRegistry) public void DrawSelection() { - //IL_0144: Unknown result type (might be due to invalid IL or missing references) - //IL_0149: Unknown result type (might be due to invalid IL or missing references) - //IL_014b: Unknown result type (might be due to invalid IL or missing references) if (QuestSelected == null) { throw new InvalidOperationException("QuestSelected action must be set before drawing the quest selector."); @@ -55,10 +52,9 @@ internal sealed class QuestSelector(QuestRegistry questRegistry) { enumerable = questRegistry.AllQuests.Where((Quest x) => DefaultPredicate?.Invoke(x) ?? true); } - ChildDisposable val = ImRaii.Child((ImU8String)"##QuestScrollArea", new Vector2(0f, 300f), false); - try + using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("##QuestScrollArea", new Vector2(0f, 300f), border: false)) { - if (ChildDisposable.op_Implicit(val)) + if ((bool)childDisposable) { foreach (Quest item in enumerable) { @@ -75,10 +71,6 @@ internal sealed class QuestSelector(QuestRegistry questRegistry) } } } - finally - { - ((ChildDisposable)(ref val)).Dispose(); - } ImGui.EndCombo(); } else diff --git a/Questionable/Questionable.Windows/ChangelogWindow.cs b/Questionable/Questionable.Windows/ChangelogWindow.cs index bbcaef2..7653583 100644 --- a/Questionable/Questionable.Windows/ChangelogWindow.cs +++ b/Questionable/Questionable.Windows/ChangelogWindow.cs @@ -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 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 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(); } } diff --git a/Questionable/Questionable.Windows/ConfigWindow.cs b/Questionable/Questionable.Windows/ConfigWindow.cs index d4bfc4c..1e094c1 100644 --- a/Questionable/Questionable.Windows/ConfigWindow.cs +++ b/Questionable/Questionable.Windows/ConfigWindow.cs @@ -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(); } } diff --git a/Questionable/Questionable.Windows/FateSelectionWindow.cs b/Questionable/Questionable.Windows/FateSelectionWindow.cs index a9ed0f3..2ecbdcc 100644 --- a/Questionable/Questionable.Windows/FateSelectionWindow.cs +++ b/Questionable/Questionable.Windows/FateSelectionWindow.cs @@ -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 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 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) diff --git a/Questionable/Questionable.Windows/JournalProgressWindow.cs b/Questionable/Questionable.Windows/JournalProgressWindow.cs index 5c3b782..88ddd06 100644 --- a/Questionable/Questionable.Windows/JournalProgressWindow.cs +++ b/Questionable/Questionable.Windows/JournalProgressWindow.cs @@ -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(); } } diff --git a/Questionable/Questionable.Windows/OneTimeSetupWindow.cs b/Questionable/Questionable.Windows/OneTimeSetupWindow.cs index 11ab0b0..c9115ec 100644 --- a/Questionable/Questionable.Windows/OneTimeSetupWindow.cs +++ b/Questionable/Questionable.Windows/OneTimeSetupWindow.cs @@ -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(); diff --git a/Questionable/Questionable.Windows/PriorityWindow.cs b/Questionable/Questionable.Windows/PriorityWindow.cs index a14f7c3..8f390f6 100644 --- a/Questionable/Questionable.Windows/PriorityWindow.cs +++ b/Questionable/Questionable.Windows/PriorityWindow.cs @@ -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(); } } diff --git a/Questionable/Questionable.Windows/QuestSelectionWindow.cs b/Questionable/Questionable.Windows/QuestSelectionWindow.cs index f0c42cd..e093d3f 100644 --- a/Questionable/Questionable.Windows/QuestSelectionWindow.cs +++ b/Questionable/Questionable.Windows/QuestSelectionWindow.cs @@ -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) diff --git a/Questionable/Questionable.Windows/QuestSequenceWindow.cs b/Questionable/Questionable.Windows/QuestSequenceWindow.cs index f1d2301..4e20623 100644 --- a/Questionable/Questionable.Windows/QuestSequenceWindow.cs +++ b/Questionable/Questionable.Windows/QuestSequenceWindow.cs @@ -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(); } diff --git a/Questionable/Questionable.Windows/QuestValidationWindow.cs b/Questionable/Questionable.Windows/QuestValidationWindow.cs index c599939..0b75078 100644 --- a/Questionable/Questionable.Windows/QuestValidationWindow.cs +++ b/Questionable/Questionable.Windows/QuestValidationWindow.cs @@ -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() diff --git a/Questionable/Questionable.Windows/QuestWindow.cs b/Questionable/Questionable.Windows/QuestWindow.cs index b28e1d9..ba096c6 100644 --- a/Questionable/Questionable.Windows/QuestWindow.cs +++ b/Questionable/Questionable.Windows/QuestWindow.cs @@ -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), diff --git a/Questionable/Questionable.Windows/SeasonalDutySelectionWindow.cs b/Questionable/Questionable.Windows/SeasonalDutySelectionWindow.cs index 93096b7..2932d0e 100644 --- a/Questionable/Questionable.Windows/SeasonalDutySelectionWindow.cs +++ b/Questionable/Questionable.Windows/SeasonalDutySelectionWindow.cs @@ -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 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 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) diff --git a/Questionable/Questionable/DalamudInitializer.cs b/Questionable/Questionable/DalamudInitializer.cs index b3181dd..154f2a9 100644 --- a/Questionable/Questionable/DalamudInitializer.cs +++ b/Questionable/Questionable/DalamudInitializer.cs @@ -57,18 +57,18 @@ internal sealed class DalamudInitializer : IDisposable _configuration = configuration; _partyWatchdog = partyWatchdog; _logger = logger; - _windowSystem.AddWindow((IWindow)(object)oneTimeSetupWindow); - _windowSystem.AddWindow((IWindow)(object)questWindow); - _windowSystem.AddWindow((IWindow)(object)configWindow); - _windowSystem.AddWindow((IWindow)(object)debugOverlay); - _windowSystem.AddWindow((IWindow)(object)questSelectionWindow); - _windowSystem.AddWindow((IWindow)(object)questSequenceWindow); - _windowSystem.AddWindow((IWindow)(object)questValidationWindow); - _windowSystem.AddWindow((IWindow)(object)journalProgressWindow); - _windowSystem.AddWindow((IWindow)(object)priorityWindow); - _windowSystem.AddWindow((IWindow)(object)fateSelectionWindow); - _windowSystem.AddWindow((IWindow)(object)seasonalDutySelectionWindow); - _windowSystem.AddWindow((IWindow)(object)changelogWindow); + _windowSystem.AddWindow(oneTimeSetupWindow); + _windowSystem.AddWindow(questWindow); + _windowSystem.AddWindow(configWindow); + _windowSystem.AddWindow(debugOverlay); + _windowSystem.AddWindow(questSelectionWindow); + _windowSystem.AddWindow(questSequenceWindow); + _windowSystem.AddWindow(questValidationWindow); + _windowSystem.AddWindow(journalProgressWindow); + _windowSystem.AddWindow(priorityWindow); + _windowSystem.AddWindow(fateSelectionWindow); + _windowSystem.AddWindow(seasonalDutySelectionWindow); + _windowSystem.AddWindow(changelogWindow); _pluginInterface.UiBuilder.Draw += _windowSystem.Draw; _pluginInterface.UiBuilder.OpenMainUi += ToggleQuestWindow; _pluginInterface.UiBuilder.OpenConfigUi += _configWindow.Toggle;