1
0
forked from liza/Deliveroo

Disable turn-ins if not high enough in GC

This commit is contained in:
Liza 2023-09-22 08:28:14 +02:00
parent ccfe447897
commit a9b72380cd
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -77,6 +77,21 @@ internal sealed class TurnInWindow : Window
public override void Draw()
{
GrandCompany grandCompany = _plugin.GetGrandCompany();
if (grandCompany == GrandCompany.None)
{
// not sure we should ever get here
State = false;
return;
}
if (_plugin.GetGrandCompanyRank() < 6)
{
State = false;
ImGui.TextColored(ImGuiColors.DalamudRed, "You do not have the required rank for Expert Delivery.");
return;
}
bool state = State;
if (ImGui.Checkbox("Handle GC turn ins/exchange automatically", ref state))
{
@ -86,16 +101,13 @@ internal sealed class TurnInWindow : Window
ImGui.Indent(27);
if (Multiplier == 1m)
{
ImGui.TextColored(ImGuiColors.DalamudRed, "You do not have a buff active");
ImGui.TextColored(ImGuiColors.DalamudRed, "You do not have an active seal buff.");
}
else
{
ImGui.TextColored(ImGuiColors.HealerGreen, $"Current Buff: {(Multiplier - 1m) * 100:N0}%%");
}
GrandCompany grandCompany = _plugin.GetGrandCompany();
if (grandCompany != GrandCompany.None) // not sure we should ever get here
{
ImGui.Spacing();
ImGui.BeginDisabled(state);
@ -120,8 +132,6 @@ internal sealed class TurnInWindow : Window
ImGui.TextColored(ImGuiColors.DalamudRed, "Your rank isn't high enough to buy this item.");
ImGui.EndDisabled();
}
ImGui.Unindent(27);
ImGui.Separator();