muffin v7.38.6
This commit is contained in:
parent
ac85eea230
commit
317800fb39
4 changed files with 894 additions and 609 deletions
|
|
@ -307342,12 +307342,7 @@ public static class AssemblyQuestLoader
|
||||||
ref QuestStep reference22 = ref span3[num2];
|
ref QuestStep reference22 = ref span3[num2];
|
||||||
QuestStep obj21 = new QuestStep(EInteractionType.AcceptQuest, 1000168u, new Vector3(-75.48645f, -0.5013741f, -5.081299f), 132)
|
QuestStep obj21 = new QuestStep(EInteractionType.AcceptQuest, 1000168u, new Vector3(-75.48645f, -0.5013741f, -5.081299f), 132)
|
||||||
{
|
{
|
||||||
AetheryteShortcut = EAetheryteLocation.Gridania,
|
AetheryteShortcut = EAetheryteLocation.Gridania
|
||||||
AethernetShortcut = new AethernetShortcut
|
|
||||||
{
|
|
||||||
From = EAetheryteLocation.Gridania,
|
|
||||||
To = EAetheryteLocation.GridaniaLancer
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
SkipConditions skipConditions = new SkipConditions();
|
SkipConditions skipConditions = new SkipConditions();
|
||||||
SkipAetheryteCondition skipAetheryteCondition = new SkipAetheryteCondition();
|
SkipAetheryteCondition skipAetheryteCondition = new SkipAetheryteCondition();
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -151,6 +151,10 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
|
|
||||||
private const string IpcGetAlliedSocietiesWithAvailableQuests = "Questionable.AlliedSociety.GetSocietiesWithAvailableQuests";
|
private const string IpcGetAlliedSocietiesWithAvailableQuests = "Questionable.AlliedSociety.GetSocietiesWithAvailableQuests";
|
||||||
|
|
||||||
|
private const string IpcAddAlliedSocietyOptimalQuests = "Questionable.AlliedSociety.AddOptimalQuests";
|
||||||
|
|
||||||
|
private const string IpcGetAlliedSocietyOptimalQuests = "Questionable.AlliedSociety.GetOptimalQuests";
|
||||||
|
|
||||||
private readonly QuestController _questController;
|
private readonly QuestController _questController;
|
||||||
|
|
||||||
private readonly QuestRegistry _questRegistry;
|
private readonly QuestRegistry _questRegistry;
|
||||||
|
|
@ -269,6 +273,10 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
|
|
||||||
private readonly ICallGateProvider<List<byte>> _getAlliedSocietiesWithAvailableQuests;
|
private readonly ICallGateProvider<List<byte>> _getAlliedSocietiesWithAvailableQuests;
|
||||||
|
|
||||||
|
private readonly ICallGateProvider<byte, int> _addAlliedSocietyOptimalQuests;
|
||||||
|
|
||||||
|
private readonly ICallGateProvider<byte, List<string>> _getAlliedSocietyOptimalQuests;
|
||||||
|
|
||||||
public QuestionableIpc(QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, QuestData questData, ManualPriorityComponent manualPriorityComponent, PresetBuilderComponent presetBuilderComponent, Configuration configuration, IDalamudPluginInterface pluginInterface, IServiceProvider serviceProvider)
|
public QuestionableIpc(QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, QuestData questData, ManualPriorityComponent manualPriorityComponent, PresetBuilderComponent presetBuilderComponent, Configuration configuration, IDalamudPluginInterface pluginInterface, IServiceProvider serviceProvider)
|
||||||
{
|
{
|
||||||
QuestionableIpc questionableIpc = this;
|
QuestionableIpc questionableIpc = this;
|
||||||
|
|
@ -382,6 +390,10 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
_getAlliedSocietyCurrentRank.RegisterFunc(GetAlliedSocietyCurrentRank);
|
_getAlliedSocietyCurrentRank.RegisterFunc(GetAlliedSocietyCurrentRank);
|
||||||
_getAlliedSocietiesWithAvailableQuests = pluginInterface.GetIpcProvider<List<byte>>("Questionable.AlliedSociety.GetSocietiesWithAvailableQuests");
|
_getAlliedSocietiesWithAvailableQuests = pluginInterface.GetIpcProvider<List<byte>>("Questionable.AlliedSociety.GetSocietiesWithAvailableQuests");
|
||||||
_getAlliedSocietiesWithAvailableQuests.RegisterFunc(GetAlliedSocietiesWithAvailableQuests);
|
_getAlliedSocietiesWithAvailableQuests.RegisterFunc(GetAlliedSocietiesWithAvailableQuests);
|
||||||
|
_addAlliedSocietyOptimalQuests = pluginInterface.GetIpcProvider<byte, int>("Questionable.AlliedSociety.AddOptimalQuests");
|
||||||
|
_addAlliedSocietyOptimalQuests.RegisterFunc(AddAlliedSocietyOptimalQuests);
|
||||||
|
_getAlliedSocietyOptimalQuests = pluginInterface.GetIpcProvider<byte, List<string>>("Questionable.AlliedSociety.GetOptimalQuests");
|
||||||
|
_getAlliedSocietyOptimalQuests.RegisterFunc(GetAlliedSocietyOptimalQuests);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool StartQuest(string questId, bool single)
|
private bool StartQuest(string questId, bool single)
|
||||||
|
|
@ -1026,9 +1038,16 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
byte num = (byte)(ptr->BeastReputation[alliedSocietyId - 1].Rank & 0x7F);
|
byte b = (byte)(ptr->BeastReputation[alliedSocietyId - 1].Rank & 0x7F);
|
||||||
byte b = (byte)((alliedSocietyId <= 5) ? 8 : 3);
|
return b >= (EAlliedSociety)alliedSocietyId switch
|
||||||
return num >= b;
|
{
|
||||||
|
EAlliedSociety.Amaljaa => 3,
|
||||||
|
EAlliedSociety.Sylphs => 3,
|
||||||
|
EAlliedSociety.Kobolds => 3,
|
||||||
|
EAlliedSociety.Sahagin => 3,
|
||||||
|
EAlliedSociety.Ixal => 7,
|
||||||
|
_ => 8,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private unsafe int GetAlliedSocietyCurrentRank(byte alliedSocietyId)
|
private unsafe int GetAlliedSocietyCurrentRank(byte alliedSocietyId)
|
||||||
|
|
@ -1060,6 +1079,71 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int AddAlliedSocietyOptimalQuests(byte alliedSocietyId)
|
||||||
|
{
|
||||||
|
if (!Enum.IsDefined(typeof(EAlliedSociety), alliedSocietyId) || alliedSocietyId == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EAlliedSociety eAlliedSociety = (EAlliedSociety)alliedSocietyId;
|
||||||
|
List<QuestId> availableAlliedSocietyQuests = _serviceProvider.GetRequiredService<AlliedSocietyQuestFunctions>().GetAvailableAlliedSocietyQuests(eAlliedSociety);
|
||||||
|
if (availableAlliedSocietyQuests.Count == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Quest quest;
|
||||||
|
List<QuestInfo> list = (from QuestInfo questInfo in availableAlliedSocietyQuests.Select((QuestId questId) => _questData.GetQuestInfo(questId))
|
||||||
|
where _questRegistry.TryGetQuest(questInfo.QuestId, out quest) && !quest.Root.Disabled
|
||||||
|
where !_questController.ManualPriorityQuests.Any((Quest pq) => pq.Id.Equals(questInfo.QuestId))
|
||||||
|
orderby questInfo.AlliedSocietyRank descending
|
||||||
|
select questInfo).ToList();
|
||||||
|
if (list.Count == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int val = (((int)eAlliedSociety <= 5) ? 12 : 3);
|
||||||
|
int alliedSocietyRemainingAllowances = GetAlliedSocietyRemainingAllowances();
|
||||||
|
int count = Math.Min(Math.Min(val, alliedSocietyRemainingAllowances), list.Count);
|
||||||
|
int num = 0;
|
||||||
|
foreach (QuestInfo item in list.Take(count))
|
||||||
|
{
|
||||||
|
if (_questController.AddQuestPriority(item.QuestId))
|
||||||
|
{
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<string> GetAlliedSocietyOptimalQuests(byte alliedSocietyId)
|
||||||
|
{
|
||||||
|
if (!Enum.IsDefined(typeof(EAlliedSociety), alliedSocietyId) || alliedSocietyId == 0)
|
||||||
|
{
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
EAlliedSociety eAlliedSociety = (EAlliedSociety)alliedSocietyId;
|
||||||
|
List<QuestId> availableAlliedSocietyQuests = _serviceProvider.GetRequiredService<AlliedSocietyQuestFunctions>().GetAvailableAlliedSocietyQuests(eAlliedSociety);
|
||||||
|
if (availableAlliedSocietyQuests.Count == 0)
|
||||||
|
{
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
Quest quest;
|
||||||
|
List<QuestInfo> list = (from QuestInfo questInfo in availableAlliedSocietyQuests.Select((QuestId questId) => _questData.GetQuestInfo(questId))
|
||||||
|
where _questRegistry.TryGetQuest(questInfo.QuestId, out quest) && !quest.Root.Disabled
|
||||||
|
where !_questController.ManualPriorityQuests.Any((Quest pq) => pq.Id.Equals(questInfo.QuestId))
|
||||||
|
orderby questInfo.AlliedSocietyRank descending
|
||||||
|
select questInfo).ToList();
|
||||||
|
if (list.Count == 0)
|
||||||
|
{
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
int val = (((int)eAlliedSociety <= 5) ? 12 : 3);
|
||||||
|
int alliedSocietyRemainingAllowances = GetAlliedSocietyRemainingAllowances();
|
||||||
|
int count = Math.Min(Math.Min(val, alliedSocietyRemainingAllowances), list.Count);
|
||||||
|
return (from q in list.Take(count)
|
||||||
|
select q.QuestId.ToString()).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_exportQuestPriority.UnregisterFunc();
|
_exportQuestPriority.UnregisterFunc();
|
||||||
|
|
@ -1112,5 +1196,7 @@ internal sealed class QuestionableIpc : IDisposable
|
||||||
_getAlliedSocietyAvailableQuestIds.UnregisterFunc();
|
_getAlliedSocietyAvailableQuestIds.UnregisterFunc();
|
||||||
_getAlliedSocietyTimeUntilReset.UnregisterFunc();
|
_getAlliedSocietyTimeUntilReset.UnregisterFunc();
|
||||||
_getAlliedSocietyRemainingAllowances.UnregisterFunc();
|
_getAlliedSocietyRemainingAllowances.UnregisterFunc();
|
||||||
|
_addAlliedSocietyOptimalQuests.UnregisterFunc();
|
||||||
|
_getAlliedSocietyOptimalQuests.UnregisterFunc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Dalamud.Bindings.ImGui;
|
using Dalamud.Bindings.ImGui;
|
||||||
|
using Dalamud.Game.Text;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Colors;
|
using Dalamud.Interface.Colors;
|
||||||
using Dalamud.Interface.Components;
|
using Dalamud.Interface.Components;
|
||||||
|
|
@ -21,7 +22,7 @@ namespace Questionable.Windows.JournalComponents;
|
||||||
|
|
||||||
internal sealed class AlliedSocietyJournalComponent
|
internal sealed class AlliedSocietyJournalComponent
|
||||||
{
|
{
|
||||||
private static readonly string[] RankNames = new string[8] { "Neutral", "Recognized", "Friendly", "Trusted", "Respected", "Honored", "Sworn", "Allied" };
|
private static readonly string[] RankNames = new string[9] { "Neutral", "Recognized", "Friendly", "Trusted", "Respected", "Honored", "Sworn", "Bloodsworn", "Allied" };
|
||||||
|
|
||||||
private const int DefaultDailyQuestLimit = 3;
|
private const int DefaultDailyQuestLimit = 3;
|
||||||
|
|
||||||
|
|
@ -114,12 +115,11 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
if (ImGui.IsItemHovered())
|
if (ImGui.IsItemHovered())
|
||||||
{
|
{
|
||||||
ImGui.BeginTooltip();
|
ImGui.BeginTooltip();
|
||||||
ImGui.TextUnformatted("Shared across ALL allied societies (all expansions)");
|
ImGui.TextUnformatted("Shared across all allied societies");
|
||||||
text = new ImU8String(12, 1);
|
text = new ImU8String(12, 1);
|
||||||
text.AppendLiteral("Used today: ");
|
text.AppendLiteral("Used today: ");
|
||||||
text.AppendFormatted(value);
|
text.AppendFormatted(value);
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
ImGui.TextUnformatted("Each allied society has a limit of 3 quests per day");
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
@ -174,15 +174,15 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
|
|
||||||
private void DrawQuestList(EAlliedSociety alliedSociety, List<QuestInfo> quests)
|
private void DrawQuestList(EAlliedSociety alliedSociety, List<QuestInfo> quests)
|
||||||
{
|
{
|
||||||
if ((int)alliedSociety <= 5)
|
if ((int)alliedSociety <= 4)
|
||||||
{
|
{
|
||||||
byte rank = 1;
|
byte rank = 1;
|
||||||
while (rank <= 8)
|
while (rank <= 4)
|
||||||
{
|
{
|
||||||
List<QuestInfo> list = quests.Where((QuestInfo x) => x.AlliedSocietyRank == rank).ToList();
|
List<QuestInfo> list = quests.Where((QuestInfo x) => x.AlliedSocietyRank == rank).ToList();
|
||||||
if (list.Count != 0)
|
if (list.Count != 0)
|
||||||
{
|
{
|
||||||
ImGui.Text(RankNames[rank - 1]);
|
ImGui.Text(RankNames[rank]);
|
||||||
foreach (QuestInfo item in list)
|
foreach (QuestInfo item in list)
|
||||||
{
|
{
|
||||||
DrawQuest(item);
|
DrawQuest(item);
|
||||||
|
|
@ -191,11 +191,46 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
byte b = (byte)(rank + 1);
|
byte b = (byte)(rank + 1);
|
||||||
rank = b;
|
rank = b;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (alliedSociety == EAlliedSociety.Ixal)
|
||||||
|
{
|
||||||
|
byte rank2 = 1;
|
||||||
|
while (rank2 <= 8)
|
||||||
|
{
|
||||||
|
List<QuestInfo> list2 = quests.Where((QuestInfo x) => x.AlliedSocietyRank == rank2).ToList();
|
||||||
|
if (list2.Count != 0)
|
||||||
|
{
|
||||||
|
ImGui.Text(RankNames[rank2]);
|
||||||
|
foreach (QuestInfo item2 in list2)
|
||||||
|
{
|
||||||
|
DrawQuest(item2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
byte b = (byte)(rank2 + 1);
|
||||||
|
rank2 = b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((int)alliedSociety < 6)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach (QuestInfo quest in quests)
|
byte rank3 = 1;
|
||||||
|
while (rank3 <= 9)
|
||||||
{
|
{
|
||||||
DrawQuest(quest);
|
List<QuestInfo> list3 = quests.Where((QuestInfo x) => x.AlliedSocietyRank == rank3).ToList();
|
||||||
|
if (list3.Count != 0)
|
||||||
|
{
|
||||||
|
ImGui.Text(RankNames[rank3]);
|
||||||
|
foreach (QuestInfo item3 in list3)
|
||||||
|
{
|
||||||
|
DrawQuest(item3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
byte b = (byte)(rank3 + 1);
|
||||||
|
rank3 = b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,7 +249,7 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
{
|
{
|
||||||
DrawDisabledAddButton();
|
DrawDisabledAddButton();
|
||||||
}
|
}
|
||||||
else if (flag && list.Count > 3)
|
else if (flag)
|
||||||
{
|
{
|
||||||
DrawArrSocietyButtons(alliedSociety, list, dailyLimit, remainingAllowances);
|
DrawArrSocietyButtons(alliedSociety, list, dailyLimit, remainingAllowances);
|
||||||
}
|
}
|
||||||
|
|
@ -251,8 +286,13 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
int num = Math.Min(Math.Min(dailyLimit, remainingAllowances), availableQuests.Count);
|
int num = Math.Min(Math.Min(dailyLimit, remainingAllowances), availableQuests.Count);
|
||||||
using (ImRaii.Disabled(remainingAllowances == 0))
|
using (ImRaii.Disabled(remainingAllowances == 0))
|
||||||
{
|
{
|
||||||
string text = ((num == remainingAllowances) ? $"Add {num} (Today's Remaining)" : $"Add {num} (Recommended)");
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, num switch
|
||||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, text))
|
{
|
||||||
|
1 => "Add 1 Quest (Optimal)",
|
||||||
|
2 => "Add 2 Quests (Optimal)",
|
||||||
|
3 => "Add 3 Quests (Optimal)",
|
||||||
|
_ => (num != remainingAllowances) ? $"Add {num} (Optimal)" : $"Add {num} (Today's Remaining)",
|
||||||
|
}))
|
||||||
{
|
{
|
||||||
AddQuestsToPriority(alliedSociety, availableQuests.Take(num).ToList());
|
AddQuestsToPriority(alliedSociety, availableQuests.Take(num).ToList());
|
||||||
}
|
}
|
||||||
|
|
@ -262,7 +302,7 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
DrawRecommendedButtonTooltip(num, remainingAllowances, dailyLimit, alliedSociety, availableQuests.Count);
|
DrawRecommendedButtonTooltip(num, remainingAllowances, dailyLimit, alliedSociety, availableQuests.Count);
|
||||||
}
|
}
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ListOl, $"Add All {availableQuests.Count} (Ignore Limit)"))
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ListOl, $"Add All {availableQuests.Count} Available"))
|
||||||
{
|
{
|
||||||
AddQuestsToPriority(alliedSociety, availableQuests);
|
AddQuestsToPriority(alliedSociety, availableQuests);
|
||||||
}
|
}
|
||||||
|
|
@ -277,50 +317,122 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
ImGui.BeginTooltip();
|
ImGui.BeginTooltip();
|
||||||
if (remainingAllowances == 0)
|
if (remainingAllowances == 0)
|
||||||
{
|
{
|
||||||
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
ImGui.TextUnformatted("No daily allowances remaining");
|
ImGui.TextUnformatted("No daily allowances remaining");
|
||||||
|
}
|
||||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
ImU8String text = new ImU8String(44, 1);
|
text = new ImU8String(44, 1);
|
||||||
text.AppendLiteral("You've used all ");
|
text.AppendLiteral("You've used all ");
|
||||||
text.AppendFormatted(12);
|
text.AppendFormatted(12);
|
||||||
text.AppendLiteral(" shared allowances for today");
|
text.AppendLiteral(" shared allowances for today");
|
||||||
ImGui.TextColored(in col, text);
|
ImGui.TextColored(in col, text);
|
||||||
}
|
}
|
||||||
else if (questsToAddCount == remainingAllowances)
|
else if (questsToAddCount == remainingAllowances && questsToAddCount < availableCount)
|
||||||
{
|
{
|
||||||
ImU8String text = new ImU8String(47, 1);
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(5, 2);
|
||||||
text.AppendLiteral("Add ");
|
text.AppendLiteral("Add ");
|
||||||
text.AppendFormatted(questsToAddCount);
|
text.AppendFormatted(questsToAddCount);
|
||||||
text.AppendLiteral(" quests - matches your remaining allowances");
|
text.AppendLiteral(" ");
|
||||||
|
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
Vector4 col = ImGuiColors.ParsedGreen;
|
}
|
||||||
text = new ImU8String(50, 1);
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
|
text = new ImU8String(44, 2);
|
||||||
text.AppendLiteral("You can complete ");
|
text.AppendLiteral("You can complete ");
|
||||||
text.AppendFormatted(remainingAllowances);
|
text.AppendFormatted(remainingAllowances);
|
||||||
text.AppendLiteral(" more allied society quests today");
|
text.AppendLiteral(" more allied society ");
|
||||||
|
text.AppendFormatted((remainingAllowances == 1) ? "quest" : "quests");
|
||||||
|
text.AppendLiteral(" today");
|
||||||
ImGui.TextColored(in col, text);
|
ImGui.TextColored(in col, text);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
|
||||||
}
|
}
|
||||||
else if (questsToAddCount == dailyLimit)
|
else if (questsToAddCount == dailyLimit)
|
||||||
{
|
{
|
||||||
ImU8String text = new ImU8String(41, 1);
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(11, 1);
|
||||||
text.AppendLiteral("Add ");
|
text.AppendLiteral("Add ");
|
||||||
text.AppendFormatted(dailyLimit);
|
text.AppendFormatted(dailyLimit);
|
||||||
text.AppendLiteral(" quests - using all shared allowances");
|
text.AppendLiteral(" quests");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "This will use all 12 shared allowances");
|
}
|
||||||
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
|
text = new ImU8String(51, 2);
|
||||||
|
text.AppendLiteral("This will use ");
|
||||||
|
text.AppendFormatted(dailyLimit);
|
||||||
|
text.AppendLiteral(" of your ");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(" remaining shared allowances");
|
||||||
|
ImGui.TextColored(in col, text);
|
||||||
|
ImGui.Spacing();
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
|
||||||
|
}
|
||||||
|
else if (questsToAddCount == availableCount)
|
||||||
|
{
|
||||||
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(20, 3);
|
||||||
|
text.AppendLiteral("Add all ");
|
||||||
|
text.AppendFormatted(questsToAddCount);
|
||||||
|
text.AppendLiteral(" available ");
|
||||||
|
text.AppendFormatted(alliedSociety);
|
||||||
|
text.AppendLiteral(" ");
|
||||||
|
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||||
|
ImGui.TextUnformatted(text);
|
||||||
|
}
|
||||||
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
|
text = new ImU8String(37, 2);
|
||||||
|
text.AppendLiteral("Uses ");
|
||||||
|
text.AppendFormatted(questsToAddCount);
|
||||||
|
text.AppendLiteral(" of ");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(" shared allowances remaining");
|
||||||
|
ImGui.TextColored(in col, text);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Prioritises highest rank quests first");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImU8String text = new ImU8String(12, 2);
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.BoxedLetterQ.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(6, 3);
|
||||||
text.AppendLiteral("Add ");
|
text.AppendLiteral("Add ");
|
||||||
text.AppendFormatted(questsToAddCount);
|
text.AppendFormatted(questsToAddCount);
|
||||||
text.AppendLiteral(" ");
|
text.AppendLiteral(" ");
|
||||||
text.AppendFormatted(alliedSociety);
|
text.AppendFormatted(alliedSociety);
|
||||||
text.AppendLiteral(" quests");
|
text.AppendLiteral(" ");
|
||||||
|
text.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
|
}
|
||||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
text = new ImU8String(55, 2);
|
text = new ImU8String(55, 2);
|
||||||
text.AppendLiteral("Limited by available quests (");
|
text.AppendLiteral("Limited by available quests (");
|
||||||
|
|
@ -340,57 +452,90 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
ImGui.BeginTooltip();
|
ImGui.BeginTooltip();
|
||||||
if (availableCount > remainingAllowances)
|
if (availableCount > remainingAllowances)
|
||||||
{
|
{
|
||||||
|
ImU8String text;
|
||||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||||
{
|
{
|
||||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ExclamationTriangle, "Warning: Exceeds shared allowances");
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.TextUnformatted("Warning: Exceeds remaining allowances");
|
||||||
}
|
}
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImU8String text = new ImU8String(54, 1);
|
text = new ImU8String(54, 1);
|
||||||
text.AppendLiteral("This adds all ");
|
text.AppendLiteral("This adds all ");
|
||||||
text.AppendFormatted(availableCount);
|
text.AppendFormatted(availableCount);
|
||||||
text.AppendLiteral(" available quests to your priority list,");
|
text.AppendLiteral(" available quests to your priority list,");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
text = new ImU8String(47, 1);
|
text = new ImU8String(37, 2);
|
||||||
text.AppendLiteral("but you only have ");
|
text.AppendLiteral("but you only have ");
|
||||||
text.AppendFormatted(remainingAllowances);
|
text.AppendFormatted(remainingAllowances);
|
||||||
text.AppendLiteral(" shared allowances remaining.");
|
text.AppendLiteral(" shared ");
|
||||||
|
text.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances");
|
||||||
|
text.AppendLiteral(" remaining.");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "The excess quests won't be completable until tomorrow.");
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "The excess quests won't be completable until tomorrow.");
|
||||||
}
|
}
|
||||||
else if (availableCount > dailyLimit)
|
else if (availableCount > dailyLimit)
|
||||||
{
|
{
|
||||||
|
ImU8String text;
|
||||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||||
{
|
{
|
||||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ExclamationTriangle, "Warning: Exceeds shared allowances");
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.TextUnformatted("Warning: Exceeds daily optimal amount");
|
||||||
}
|
}
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImU8String text = new ImU8String(32, 1);
|
text = new ImU8String(32, 1);
|
||||||
text.AppendLiteral("This adds all ");
|
text.AppendLiteral("This adds all ");
|
||||||
text.AppendFormatted(availableCount);
|
text.AppendFormatted(availableCount);
|
||||||
text.AppendLiteral(" available quests,");
|
text.AppendLiteral(" available quests,");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
text = new ImU8String(57, 1);
|
text = new ImU8String(48, 1);
|
||||||
text.AppendLiteral("but you can only complete ");
|
text.AppendLiteral("using more than the typical ");
|
||||||
text.AppendFormatted(12);
|
text.AppendFormatted(3);
|
||||||
text.AppendLiteral(" allied society quests per day.");
|
text.AppendLiteral(" quests per society.");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "You'll need multiple days to complete them all.");
|
Vector4 col = ImGuiColors.ParsedGreen;
|
||||||
|
text = new ImU8String(37, 1);
|
||||||
|
text.AppendLiteral("You have ");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(" shared allowances remaining");
|
||||||
|
ImGui.TextColored(in col, text);
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "You may want to save allowances for other societies.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImU8String text = new ImU8String(26, 2);
|
ImU8String text;
|
||||||
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||||
|
{
|
||||||
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(20, 3);
|
||||||
text.AppendLiteral("Add all ");
|
text.AppendLiteral("Add all ");
|
||||||
text.AppendFormatted(availableCount);
|
text.AppendFormatted(availableCount);
|
||||||
text.AppendLiteral(" available ");
|
text.AppendLiteral(" available ");
|
||||||
text.AppendFormatted(alliedSociety);
|
text.AppendFormatted(alliedSociety);
|
||||||
text.AppendLiteral(" quests");
|
text.AppendLiteral(" ");
|
||||||
|
text.AppendFormatted((availableCount == 1) ? "quest" : "quests");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
|
||||||
{
|
|
||||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, $"All can be completed today ({remainingAllowances} shared allowances remaining)");
|
|
||||||
}
|
}
|
||||||
|
ImGui.Spacing();
|
||||||
|
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||||
|
text = new ImU8String(27, 2);
|
||||||
|
text.AppendLiteral("Uses ");
|
||||||
|
text.AppendFormatted(availableCount);
|
||||||
|
text.AppendLiteral(" of ");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(" shared allowances");
|
||||||
|
ImGui.TextColored(in col, text);
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today");
|
||||||
}
|
}
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
}
|
}
|
||||||
|
|
@ -399,10 +544,10 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
{
|
{
|
||||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, availableQuests.Count switch
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, availableQuests.Count switch
|
||||||
{
|
{
|
||||||
1 => "Add Quest to Priority",
|
1 => "Add 1 Quest",
|
||||||
2 => "Add Both Quests to Priority",
|
2 => "Add 2 Quests",
|
||||||
3 => "Add All 3 Quests to Priority",
|
3 => "Add 3 Quests",
|
||||||
_ => $"Add All {availableQuests.Count} Quests to Priority",
|
_ => $"Add All {availableQuests.Count} Quests",
|
||||||
}))
|
}))
|
||||||
{
|
{
|
||||||
AddQuestsToPriority(alliedSociety, availableQuests);
|
AddQuestsToPriority(alliedSociety, availableQuests);
|
||||||
|
|
@ -421,19 +566,41 @@ internal sealed class AlliedSocietyJournalComponent
|
||||||
text.AppendFormatted((availableQuests.Count == 1) ? "quest" : "quests");
|
text.AppendFormatted((availableQuests.Count == 1) ? "quest" : "quests");
|
||||||
text.AppendLiteral(" to priority");
|
text.AppendLiteral(" to priority");
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
|
ImGui.Spacing();
|
||||||
if (availableQuests.Count <= remainingAllowances)
|
if (availableQuests.Count <= remainingAllowances)
|
||||||
{
|
{
|
||||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||||
{
|
{
|
||||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, $"Uses {availableQuests.Count} of {remainingAllowances} shared allowances");
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(17, 3);
|
||||||
|
text.AppendLiteral("Uses ");
|
||||||
|
text.AppendFormatted(availableQuests.Count);
|
||||||
|
text.AppendLiteral(" of ");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(" shared ");
|
||||||
|
text.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances");
|
||||||
|
ImGui.TextUnformatted(text);
|
||||||
}
|
}
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||||
{
|
{
|
||||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.ExclamationTriangle, $"Exceeds remaining allowances ({remainingAllowances})");
|
text = new ImU8String(0, 1);
|
||||||
|
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||||
|
ImGui.Text(text);
|
||||||
|
ImGui.SameLine();
|
||||||
|
text = new ImU8String(31, 1);
|
||||||
|
text.AppendLiteral("Exceeds remaining allowances (");
|
||||||
|
text.AppendFormatted(remainingAllowances);
|
||||||
|
text.AppendLiteral(")");
|
||||||
|
ImGui.TextUnformatted(text);
|
||||||
}
|
}
|
||||||
|
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Some quests won't be completable until tomorrow");
|
||||||
}
|
}
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue