diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-09-08 18:36:11 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-09-08 18:36:11 -0700 |
| commit | 4b5dd85a1fdcb1039c78261cab72047eb5a3933d (patch) | |
| tree | 94f8f4d1dabeceddd0558c3a5990eb401bd1b970 /Malmstone/Windows | |
| parent | 728d9ff38a19f0a8b72bcb004d56edabec138af8 (diff) | |
| parent | c434ed7e5b557ff82882d7ac74068169eb83de7c (diff) | |
Merge branch 'fl-bonus'
Diffstat (limited to 'Malmstone/Windows')
| -rw-r--r-- | Malmstone/Windows/ConfigWindow.cs | 30 | ||||
| -rw-r--r-- | Malmstone/Windows/MainWindow.cs | 74 |
2 files changed, 101 insertions, 3 deletions
diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs index 93af7b5..0dc4e11 100644 --- a/Malmstone/Windows/ConfigWindow.cs +++ b/Malmstone/Windows/ConfigWindow.cs @@ -151,9 +151,9 @@ public class ConfigWindow : Window, IDisposable if (ImGui.Checkbox("##ShowFLMatchesRemainingPostGame", ref showFLMatchesRemainingPostGame)) { Configuration.ShowProgressionChatPostFL = showFLMatchesRemainingPostGame; - if (showFLMatchesRemainingPostGame) + if (showFLMatchesRemainingPostGame && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled) Plugin.PvPAddon.EnableFrontlinePostMatch(); - else + else if (!showFLMatchesRemainingPostGame && !Configuration.TrackFrontlineBonus) Plugin.PvPAddon.DisableFrontlinePostMatch(); Configuration.Save(); } @@ -166,6 +166,32 @@ public class ConfigWindow : Window, IDisposable ImGui.SameLine(); ImGui.Text("Frontlines"); + ImGui.SameLine(); + ImGui.Spacing(); + ImGui.SameLine(); + + var trackFrontlineBonus = Configuration.TrackFrontlineBonus; + if (ImGui.Checkbox("##TrackFrontlineBonus", ref trackFrontlineBonus)) + { + Configuration.TrackFrontlineBonus = trackFrontlineBonus; + if (trackFrontlineBonus && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled) + Plugin.PvPAddon.EnableFrontlinePostMatch(); + else if(!trackFrontlineBonus && !Configuration.ShowProgressionChatPostFL) + Plugin.PvPAddon.DisableFrontlinePostMatch(); + Configuration.Save(); + } + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text("(EXPERIMENTAL) Track the reward bonus you get for consecutive losses in Frontline" + + "\n3rd place = +10 percent bonus (max 50 percent)" + + "\n2nd place = Current bonus is kept" + + "\n1st Place = Bonus reset to 0\n"); + ImGui.EndTooltip(); + } + ImGui.SameLine(); + ImGui.Text("Track Frontline Reward Bonus"); + var showRWMatchesRemainingPostGame = Configuration.ShowProgressionChatPostRW; if (ImGui.Checkbox("##ShowRWMatchesRemainingPostGame", ref showRWMatchesRemainingPostGame)) diff --git a/Malmstone/Windows/MainWindow.cs b/Malmstone/Windows/MainWindow.cs index 0e91c4d..1617a00 100644 --- a/Malmstone/Windows/MainWindow.cs +++ b/Malmstone/Windows/MainWindow.cs @@ -26,7 +26,7 @@ namespace Malmstone.Windows { SizeConstraints = new WindowSizeConstraints { - MinimumSize = new Vector2(460, 510), + MinimumSize = new Vector2(460, 545), MaximumSize = new Vector2(float.MaxValue, float.MaxValue) }; @@ -101,6 +101,78 @@ namespace Malmstone.Windows ImGui.BulletText($"Take 2nd Place: {xpResult.FrontlineDailyLose2nd} " + (xpResult.FrontlineDailyLose2nd == 1 ? "time" : "times")); ImGui.BulletText($"Take 3rd Place: {xpResult.FrontlineDailyLose3rd} " + (xpResult.FrontlineDailyLose3rd == 1 ? "time" : "times")); + + if (Plugin.Configuration.TrackFrontlineBonus) + { + if (Plugin.PvPService.CurrentFrontlineLosingBonus == -1) + { + ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "Complete a Frontline match to view current reward bonus"); + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text("This calculates the losing streak bonus you receive after consecutive losses in Frontlines" + + "\nPlay a match of Frontline to confirm your existing losing bonus" + + "\nYou can turn off tracking entirely in the settings"); + ImGui.EndTooltip(); + } + } + else + { + if(Plugin.PvPService.CurrentFrontlineLosingBonus == 0) + { + if(Plugin.PvPService.ConsecutiveThirdPlaceFrontline == 1) + { + ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "You'll receive 10%% reward bonus if you place 3rd"); + } + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text("You're primed for a reward bonus! You will get a 10% reward bonus if you place 3rd again" + + "\nCounter resets if you rank 1st"); + ImGui.EndTooltip(); + } + ImGui.Text("No Frontline Reward Bonus Currently Active"); + } + else + { + if (Plugin.PvPService.CurrentFrontlineLosingBonus != 50) + ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "You'll receive a " + Plugin.PvPService.CurrentFrontlineLosingBonus + "%% reward bonus placing 1st or 2nd"); + else + ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "You'll receive a " + Plugin.PvPService.CurrentFrontlineLosingBonus + "%% reward bonus placing 1st, 2nd, or 3rd"); + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text("You'll earn a percentage bonus on PvP EXP, Series EXP, and Wolf Marks " + + "until attaining First Place" ); + ImGui.EndTooltip(); + } + if (Plugin.PvPService.CurrentFrontlineLosingBonus != 50) + { + ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "Your reward bonus will increase to " + (Plugin.PvPService.CurrentFrontlineLosingBonus + 10) + "%% if place 3rd"); + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text($"Finishing 3rd again will increase your bonus to {Plugin.PvPService.CurrentFrontlineLosingBonus + 10}%." + + "\nThis increased bonus will also apply to the match where this happens."); + ImGui.EndTooltip(); + } + } + } + if (Plugin.Configuration.OutdatedFrontlineRewardBonus) + { + ImGui.SameLine(); + ImGui.TextColored(new Vector4(1.0f, 0.0f, 0.0f, 1.0f),"(Outdated)"); + if (ImGui.IsItemHovered()) + { + ImGui.BeginTooltip(); + ImGui.Text("This information may be outdated due to Frontline tracking loading and unloading!" + + "\nCalculations will refresh after your next match of Frontlines"); + ImGui.EndTooltip(); + } + } + } + } + ImGui.Spacing(); ImGui.Separator(); |
