muffin v7.5.1
This commit is contained in:
parent
a6481e7b9a
commit
965a736f84
59 changed files with 4112 additions and 5059 deletions
|
|
@ -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<string>)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<string>)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<EExpansionVersion, List<DutyInfo>> 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<EExpansionVersion>();
|
||||
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<EExpansionVersion>();
|
||||
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<DutyInfo> 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<DutyInfo> 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<string>)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<string> readOnlySpan = new ReadOnlySpan<string>(dutyModeLabels);
|
||||
readOnlySpan.CopyTo(new Span<string>(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<string>)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<string>)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<string> readOnlySpan = new ReadOnlySpan<string>(dutyModeLabels);
|
||||
readOnlySpan.CopyTo(new Span<string>(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<string>)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.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue